Skip to content

Instantly share code, notes, and snippets.

@rgov
Created April 6, 2012 07:17
Show Gist options
  • Select an option

  • Save rgov/2317884 to your computer and use it in GitHub Desktop.

Select an option

Save rgov/2317884 to your computer and use it in GitHub Desktop.
; ModuleID = '8086'
%struct.reg_t = type <{ i16, i16, i16, i16, i16, i16, i16, i16 }>
%struct.fp_reg_t = type <{}>
define i32 @jitmain(i8* nocapture %RAM, %struct.reg_t* %grf, %struct.fp_reg_t* %frf, void (i64*)* %debug) nounwind {
entry:
%0 = getelementptr %struct.reg_t* %grf, i64 0, i32 0
%1 = load i16* %0, align 2
%2 = getelementptr %struct.reg_t* %grf, i64 0, i32 1
%3 = load i16* %2, align 2
%4 = getelementptr %struct.reg_t* %grf, i64 0, i32 2
%5 = load i16* %4, align 2
%6 = getelementptr %struct.reg_t* %grf, i64 0, i32 3
%7 = load i16* %6, align 2
%8 = getelementptr %struct.reg_t* %grf, i64 0, i32 4
%9 = load i16* %8, align 2
%10 = getelementptr %struct.reg_t* %grf, i64 0, i32 5
%11 = load i16* %10, align 2
%12 = getelementptr %struct.reg_t* %grf, i64 0, i32 6
%13 = load i16* %12, align 2
%14 = getelementptr %struct.reg_t* %grf, i64 0, i32 7
%15 = load i16* %14, align 2
br label %dispatch
ret: ; preds = %E000001c4, %dispatch, %trap
store i16 %1, i16* %0, align 2
store i16 %3, i16* %2, align 2
store i16 %5, i16* %4, align 2
store i16 %7, i16* %6, align 2
store i16 %9, i16* %8, align 2
store i16 %11, i16* %10, align 2
store i16 %13, i16* %12, align 2
store i16 %15, i16* %14, align 2
ret i32 1
trap: ; No predecessors!
br label %ret
L00000000: ; preds = %dispatch
br label %E000001c4
dispatch: ; preds = %entry
%16 = load i24* inttoptr (i64 140305445700800 to i24*), align 64
switch i24 %16, label %ret [
i24 0, label %L00000000
]
E000001c4: ; preds = %L00000000
store i24 452, i24* inttoptr (i64 140305445700800 to i24*), align 64
br label %ret
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment