Skip to content

Instantly share code, notes, and snippets.

View Keksgesicht's full-sized avatar
🏠
Working from home

Jan Braun Keksgesicht

🏠
Working from home
  • Germany
  • 10:18 (UTC +01:00)
View GitHub Profile
@Keksgesicht
Keksgesicht / simple-ISel.c
Created August 27, 2025 22:31
LLVM patching approach
// RUN: %llvmbuildpath/bin/clang --sysroot=%libcpath --target="riscv32-none-elf" -menable-experimental-extensions -mabi="ilp32" -march="rv32imxsimple0p1" -O3 -S -o - %s | FileCheck %s
// CHECK: main:
// CHECK-DAG: SIMPLE.mac [[RD1:[as][0-9]+]], [[RS1:[as][0-9]+]], [[RS2:[as][0-9]+]]
// CHECK: call printf
#include <stdio.h>
#include <stdlib.h>
#include <time.h>