Skip to content

Commit

Permalink
add simple-program.config
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzthekid committed Dec 12, 2023
1 parent 430216e commit f7f5efc
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions data/simple-program.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
[
% simple_func:
% .LFB0:
% .file 1 "simple-func.c"
% .loc 1 1 31
% .cfi_startproc
%%{ addi, sp,sp,-48},
% .cfi_def_cfa_offset 48
%%{ sw, s0,44, sp},
% .cfi_offset 8, -4
%%{ addi, s0,sp,48},
% .cfi_def_cfa 8, 0
%%{ sw, a0,-36, s0},
%%{ sw, a1,-40, s0},
% .loc 1 2 7
%%{ sw, zero,-20, s0},
% .loc 1 3 10
%%{ lw, a4,-40, s0},
%%{ lw, a5,-36, s0},
{ mul, a4,a4,a5},
% .loc 1 3 8
{ lw, a5,-36, s0},
{ add, a3,a4,a5},
% .loc 1 3 15
{ lw, a4,-40, s0},
{ mv, a5,a4},
%% slli logical shift left zeros: a5*16 (but should be 17)
{ slli, a5,a5,4},
{ add, a5,a5,a4},
% .loc 1 3 5
{ add, a5,a3,a5},
{ sw, a5,-20, s0},
% .loc 1 4 10
{ lw, a5,-20, s0},
{ addi, a5,a5,16},
% .loc 1 4 5
{ lw, a4,-40, s0},
{ mul, a5,a4,a5},
{ sw, a5,-20, s0},
% .loc 1 5 10
{ lw, a5,-20, s0},
% .loc 1 6 1
{ mv, a0,a5},
{ lw, s0,44, sp},
% .cfi_restore 8
% .cfi_def_cfa 2, 48
{ addi, sp,sp,48},
% .cfi_def_cfa_offset 0
{ jr, ra}
% .cfi_endproc
].
% [
% {addi, sp,sp,-48},
% {sw, s0,44,sp},
% {addi, s0,sp,48},
% {sw, a0,-36,s0},
% {sw, a1,-40,s0},
% {sw, zero,-20,s0},
% {lw, a4,-40,s0},
% {lw, a5,-36,s0},
% {mul, a4,a4,a5},
% {lw, a5,-36,s0},
% {add, a3,a4,a5},
% {lw, a4,-40,s0},
% {mv, a5,a4},
% {slli, a5,a5,4},
% {add, a5,a5,a4},
% {add, a5,a3,a5},
% {sw, a5,-20,s0},
% {lw, a5,-20,s0},
% {addi, a5,a5,16},
% {lw, a4,-40,s0},
% {mul, a5,a4,a5},
% {sw, a5,-20,s0},
% {lw, a5,-20,s0},
% {mv, a0,a5},
% {lw, s0,44,sp},
% {addi, sp,sp,48},
% {jr, ra},
% ].

0 comments on commit f7f5efc

Please sign in to comment.