View aarch64_amx.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IDA (disassembler) and Hex-Rays (decompiler) plugin for Apple AMX | |
# | |
# WIP research. (This was edited to add more info after someone posted it to | |
# Hacker News. Click "Revisions" to see full changes.) | |
# | |
# Copyright (c) 2020 dougallj | |
# Based on Python port of VMX intrinsics plugin: | |
# Copyright (c) 2019 w4kfu - Synacktiv |
View gist:9211fd24c3759f7f340dede28929c659
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N_BITS = 8 | |
MASK = (1 << N_BITS) - 1 | |
class Ternary: | |
def __init__(self, ones, unknowns): | |
self.ones = ones & MASK | |
self.unknowns = unknowns & MASK | |
assert (self.ones & self.unknowns) == 0, (bin(self.ones), bin(self.unknowns)) | |
def __add__(self, other): |
View asm.s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global _time_load | |
global _cache_flush | |
global _run_attempt | |
extern _bools | |
extern _values | |
extern _pointers | |
section .text |
View draw-patterns.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define STB_IMAGE_WRITE_IMPLEMENTATION | |
#include "stb_image_write.h" | |
#define WIDTH_IN_BLOCKS 29 | |
#define HEIGHT_IN_BLOCKS 28 | |
#define PADDING 4 | |
#define BLOCK_WIDTH (4 * 4) | |
#define BLOCK_HEIGHT (4 * 4) |