Skip to content

Instantly share code, notes, and snippets.

@7shi 7shi/sample.c
Last active Aug 29, 2015

Embed
What would you like to do?
OpenRISC test
int global = 10;
void null()
{
return;
}
int return_zero()
{
return 0;
}
int return_one()
{
return 1;
}
int return_intsize()
{
return sizeof(int);
}
int return_pointersize()
{
return sizeof(int *);
}
short return_short()
{
return 0xffee;
}
long return_long()
{
return 0xffeeddcc;
}
int return_arg1(int a)
{
return a;
}
int return_arg2(int a, int b)
{
return b;
}
int inc(int a)
{
return ++a;
}
int add(int a, int b)
{
return a + b;
}
int add3(int a, int b, int c)
{
return a + b + c;
}
int load(volatile int *p)
{
return *p;
}
void store(volatile int *p)
{
*p = 0xff;
}
long load_long(volatile long *p)
{
return *p;
}
void store_long(volatile long *p)
{
*p = 0xfedcba98;
}
struct structure {
int a;
int b;
int c;
};
int member(struct structure *p)
{
p->b = 1;
return p->c;
}
int get_global()
{
return global;
}
void set_global(int a)
{
global = a;
}
#define UNUSED __attribute__((unused))
void set_stack()
{
UNUSED volatile int a = 0xfe;
UNUSED volatile int b = 0xff;
}
#ifndef NO_USE_STACK
int use_stack()
{
volatile int a = 0xfe;
volatile int b = 0xff;
return a + b;
}
#endif
void call_null()
{
call_null();
}
int call_simple()
{
return return_arg1(0xfe) + 1;
}
int call_complex(int a, int b)
{
global = return_arg1(b);
return b;
}
#ifndef NO_CALL_POINTER
int call_pointer(int a)
{
int (*f)(int);
f = (int(*)(int))0xfed0;
return f(a);
}
#endif
#ifndef NO_CONDITION
int condition(int *p)
{
if (p) {
*p = 10;
}
return 0;
}
#endif
#ifndef NO_LOOP
int loop(int n)
{
int sum = 0;
int i;
for (i = 0; i < n; i++) {
sum += i;
}
return sum;
}
#endif
int main()
{
return 0;
}
.file "sample.c"
.section .text
.align 4
.proc null
.global null
.type null, @function
null:
.LFB0:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE0:
.size null, .-null
.align 4
.proc return_zero
.global return_zero
.type return_zero, @function
return_zero:
.LFB1:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.addi r11,r0,0 # move immediate I
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE1:
.size return_zero, .-return_zero
.align 4
.proc return_one
.global return_one
.type return_one, @function
return_one:
.LFB2:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.addi r11,r0,1 # move immediate I
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE2:
.size return_one, .-return_one
.align 4
.proc return_intsize
.global return_intsize
.type return_intsize, @function
return_intsize:
.LFB3:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.addi r11,r0,4 # move immediate I
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE3:
.size return_intsize, .-return_intsize
.align 4
.proc return_pointersize
.global return_pointersize
.type return_pointersize, @function
return_pointersize:
.LFB4:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.addi r11,r0,4 # move immediate I
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE4:
.size return_pointersize, .-return_pointersize
.align 4
.proc return_short
.global return_short
.type return_short, @function
return_short:
.LFB5:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.addi r11,r0,-18 # move immediate I
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE5:
.size return_short, .-return_short
.align 4
.proc return_long
.global return_long
.type return_long, @function
return_long:
.LFB6:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.movhi r11,hi(-1179648) # move immediate M
l.ori r11,r11,56780 # iorsi3
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE6:
.size return_long, .-return_long
.align 4
.proc return_arg1
.global return_arg1
.type return_arg1, @function
return_arg1:
.LFB7:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.ori r11,r3,0 # move reg to reg
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE7:
.size return_arg1, .-return_arg1
.align 4
.proc return_arg2
.global return_arg2
.type return_arg2, @function
return_arg2:
.LFB8:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.ori r11,r4,0 # move reg to reg
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE8:
.size return_arg2, .-return_arg2
.align 4
.proc inc
.global inc
.type inc, @function
inc:
.LFB9:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.addi r11,r3,1 # addsi3
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE9:
.size inc, .-inc
.align 4
.proc add
.global add
.type add, @function
add:
.LFB10:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.add r11,r3,r4 # addsi3
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE10:
.size add, .-add
.align 4
.proc add3
.global add3
.type add3, @function
add3:
.LFB11:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.add r3,r3,r4 # addsi3
l.add r11,r3,r5 # addsi3
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE11:
.size add3, .-add3
.align 4
.proc load
.global load
.type load, @function
load:
.LFB12:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.lwz r11,0(r3) # SI load
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE12:
.size load, .-load
.align 4
.proc store
.global store
.type store, @function
store:
.LFB13:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.addi r4,r0,255 # move immediate I
l.sw 0(r3),r4 # SI store
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE13:
.size store, .-store
.align 4
.proc load_long
.global load_long
.type load_long, @function
load_long:
.LFB14:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.lwz r11,0(r3) # SI load
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE14:
.size load_long, .-load_long
.align 4
.proc store_long
.global store_long
.type store_long, @function
store_long:
.LFB15:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.movhi r4,hi(-19136512) # move immediate M
l.ori r4,r4,47768 # iorsi3
l.sw 0(r3),r4 # SI store
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE15:
.size store_long, .-store_long
.align 4
.proc member
.global member
.type member, @function
member:
.LFB16:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.addi r4,r0,1 # move immediate I
l.sw 4(r3),r4 # SI store
l.lwz r11,8(r3) # SI load
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE16:
.size member, .-member
.align 4
.proc get_global
.global get_global
.type get_global, @function
get_global:
.LFB17:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.movhi r3,hi(global) # movsi_high
l.ori r3,r3,lo(global) # movsi_lo_sum
l.lwz r11,0(r3) # SI load
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE17:
.size get_global, .-get_global
.align 4
.proc set_global
.global set_global
.type set_global, @function
set_global:
.LFB18:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.movhi r4,hi(global) # movsi_high
l.ori r4,r4,lo(global) # movsi_lo_sum
l.sw 0(r4),r3 # SI store
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE18:
.size set_global, .-set_global
.align 4
.proc set_stack
.global set_stack
.type set_stack, @function
set_stack:
.LFB19:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-12 # addsi3
.cfi_def_cfa_offset 12
l.addi r3,r0,254 # move immediate I
l.sw 4(r1),r3 # SI store
l.addi r3,r0,255 # move immediate I
l.sw 0(r1),r3 # SI store
l.addi r1,r1,12
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE19:
.size set_stack, .-set_stack
.align 4
.proc use_stack
.global use_stack
.type use_stack, @function
use_stack:
.LFB20:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-12 # addsi3
.cfi_def_cfa_offset 12
l.addi r3,r0,254 # move immediate I
l.sw 4(r1),r3 # SI store
l.addi r3,r0,255 # move immediate I
l.sw 0(r1),r3 # SI store
l.lwz r11,4(r1) # SI load
l.lwz r3,0(r1) # SI load
l.add r11,r11,r3 # addsi3
l.addi r1,r1,12
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE20:
.size use_stack, .-use_stack
.align 4
.proc call_null
.global call_null
.type call_null, @function
call_null:
.LFB21:
.cfi_startproc
l.sw -4(r1),r9 # SI store
l.sw -8(r1),r1 # SI store
.cfi_offset 9, -4
.cfi_offset 1, -8
l.jal call_null# call_internal # delay slot filled
l.addi r1,r1,-8 # addsi3
.cfi_def_cfa_offset 8
l.addi r1,r1,8
l.lwz r9,-4(r1) # SI load
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-8(r1) # SI load
.cfi_endproc
.LFE21:
.size call_null, .-call_null
.align 4
.proc call_simple
.global call_simple
.type call_simple, @function
call_simple:
.LFB22:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.addi r11,r0,255 # move immediate I
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE22:
.size call_simple, .-call_simple
.align 4
.proc call_complex
.global call_complex
.type call_complex, @function
call_complex:
.LFB23:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.movhi r3,hi(global) # movsi_high
l.ori r3,r3,lo(global) # movsi_lo_sum
l.sw 0(r3),r4 # SI store
l.ori r11,r4,0 # move reg to reg
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE23:
.size call_complex, .-call_complex
.align 4
.proc call_pointer
.global call_pointer
.type call_pointer, @function
call_pointer:
.LFB24:
.cfi_startproc
l.sw -4(r1),r9 # SI store
l.sw -8(r1),r1 # SI store
.cfi_offset 9, -4
.cfi_offset 1, -8
l.ori r11,r0,65232 # move immediate K
l.jalr r11 # call_value_indirect_internal # delay slot filled
l.addi r1,r1,-8 # addsi3
.cfi_def_cfa_offset 8
l.addi r1,r1,8
l.lwz r9,-4(r1) # SI load
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-8(r1) # SI load
.cfi_endproc
.LFE24:
.size call_pointer, .-call_pointer
.align 4
.proc condition
.global condition
.type condition, @function
condition:
.LFB25:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.sfeqi r3,0 # cmpsi_eq
l.bf .L27 # delay slot filled
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.addi r4,r0,10 # move immediate I
l.sw 0(r3),r4 # SI store
.L27:
l.addi r11,r0,0 # move immediate I
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE25:
.size condition, .-condition
.align 4
.proc loop
.global loop
.type loop, @function
loop:
.LFB26:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.sflesi r3,0 # cmpsi_le
l.bf .L31 # delay slot filled
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.addi r4,r0,0 # move immediate I
l.ori r11,r4,0 # move reg to reg
l.add r11,r11,r4 # addsi3
.L34:
l.addi r4,r4,1 # addsi3
l.sfne r4,r3 # cmpsi_ne
l.bf .L34 # delay slot filled
l.add r11,r11,r4 # addsi3
l.sub r11,r11,r4 # subsi3
l.j .L33 # jump_internal # delay slot filled
l.addi r1,r1,4
.L31:
l.addi r11,r0,0 # move immediate I
l.addi r1,r1,4
.L33:
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE26:
.size loop, .-loop
.align 4
.proc main
.global main
.type main, @function
main:
.LFB27:
.cfi_startproc
l.sw -4(r1),r1 # SI store
.cfi_offset 1, -4
l.addi r1,r1,-4 # addsi3
.cfi_def_cfa_offset 4
l.addi r11,r0,0 # move immediate I
l.addi r1,r1,4
l.jr r9 # return_internal # delay slot filled
l.lwz r1,-4(r1) # SI load
.cfi_endproc
.LFE27:
.size main, .-main
.global global
.section .data
.align 4
.type global, @object
.size global, 4
global:
.long 10
.ident "GCC: (GNU) 4.9.0 20140308 (experimental)"
a.out: file format elf32-or1k
Disassembly of section .text:
00000000 <null>:
0: d7 e1 0f fc l.sw -4(r1),r1
4: 9c 21 ff fc l.addi r1,r1,-4
8: 9c 21 00 04 l.addi r1,r1,4
c: 44 00 48 00 l.jr r9
10: 84 21 ff fc l.lwz r1,-4(r1)
00000014 <return_zero>:
14: d7 e1 0f fc l.sw -4(r1),r1
18: 9c 21 ff fc l.addi r1,r1,-4
1c: 9d 60 00 00 l.addi r11,r0,0
20: 9c 21 00 04 l.addi r1,r1,4
24: 44 00 48 00 l.jr r9
28: 84 21 ff fc l.lwz r1,-4(r1)
0000002c <return_one>:
2c: d7 e1 0f fc l.sw -4(r1),r1
30: 9c 21 ff fc l.addi r1,r1,-4
34: 9d 60 00 01 l.addi r11,r0,1
38: 9c 21 00 04 l.addi r1,r1,4
3c: 44 00 48 00 l.jr r9
40: 84 21 ff fc l.lwz r1,-4(r1)
00000044 <return_intsize>:
44: d7 e1 0f fc l.sw -4(r1),r1
48: 9c 21 ff fc l.addi r1,r1,-4
4c: 9d 60 00 04 l.addi r11,r0,4
50: 9c 21 00 04 l.addi r1,r1,4
54: 44 00 48 00 l.jr r9
58: 84 21 ff fc l.lwz r1,-4(r1)
0000005c <return_pointersize>:
5c: d7 e1 0f fc l.sw -4(r1),r1
60: 9c 21 ff fc l.addi r1,r1,-4
64: 9d 60 00 04 l.addi r11,r0,4
68: 9c 21 00 04 l.addi r1,r1,4
6c: 44 00 48 00 l.jr r9
70: 84 21 ff fc l.lwz r1,-4(r1)
00000074 <return_short>:
74: d7 e1 0f fc l.sw -4(r1),r1
78: 9c 21 ff fc l.addi r1,r1,-4
7c: 9d 60 ff ee l.addi r11,r0,-18
80: 9c 21 00 04 l.addi r1,r1,4
84: 44 00 48 00 l.jr r9
88: 84 21 ff fc l.lwz r1,-4(r1)
0000008c <return_long>:
8c: d7 e1 0f fc l.sw -4(r1),r1
90: 9c 21 ff fc l.addi r1,r1,-4
94: 19 60 ff ee l.movhi r11,0xffee
98: a9 6b dd cc l.ori r11,r11,0xddcc
9c: 9c 21 00 04 l.addi r1,r1,4
a0: 44 00 48 00 l.jr r9
a4: 84 21 ff fc l.lwz r1,-4(r1)
000000a8 <return_arg1>:
a8: d7 e1 0f fc l.sw -4(r1),r1
ac: 9c 21 ff fc l.addi r1,r1,-4
b0: a9 63 00 00 l.ori r11,r3,0x0
b4: 9c 21 00 04 l.addi r1,r1,4
b8: 44 00 48 00 l.jr r9
bc: 84 21 ff fc l.lwz r1,-4(r1)
000000c0 <return_arg2>:
c0: d7 e1 0f fc l.sw -4(r1),r1
c4: 9c 21 ff fc l.addi r1,r1,-4
c8: a9 64 00 00 l.ori r11,r4,0x0
cc: 9c 21 00 04 l.addi r1,r1,4
d0: 44 00 48 00 l.jr r9
d4: 84 21 ff fc l.lwz r1,-4(r1)
000000d8 <inc>:
d8: d7 e1 0f fc l.sw -4(r1),r1
dc: 9c 21 ff fc l.addi r1,r1,-4
e0: 9d 63 00 01 l.addi r11,r3,1
e4: 9c 21 00 04 l.addi r1,r1,4
e8: 44 00 48 00 l.jr r9
ec: 84 21 ff fc l.lwz r1,-4(r1)
000000f0 <add>:
f0: d7 e1 0f fc l.sw -4(r1),r1
f4: 9c 21 ff fc l.addi r1,r1,-4
f8: e1 63 20 00 l.add r11,r3,r4
fc: 9c 21 00 04 l.addi r1,r1,4
100: 44 00 48 00 l.jr r9
104: 84 21 ff fc l.lwz r1,-4(r1)
00000108 <add3>:
108: d7 e1 0f fc l.sw -4(r1),r1
10c: 9c 21 ff fc l.addi r1,r1,-4
110: e0 63 20 00 l.add r3,r3,r4
114: e1 63 28 00 l.add r11,r3,r5
118: 9c 21 00 04 l.addi r1,r1,4
11c: 44 00 48 00 l.jr r9
120: 84 21 ff fc l.lwz r1,-4(r1)
00000124 <load>:
124: d7 e1 0f fc l.sw -4(r1),r1
128: 9c 21 ff fc l.addi r1,r1,-4
12c: 85 63 00 00 l.lwz r11,0(r3)
130: 9c 21 00 04 l.addi r1,r1,4
134: 44 00 48 00 l.jr r9
138: 84 21 ff fc l.lwz r1,-4(r1)
0000013c <store>:
13c: d7 e1 0f fc l.sw -4(r1),r1
140: 9c 21 ff fc l.addi r1,r1,-4
144: 9c 80 00 ff l.addi r4,r0,255
148: d4 03 20 00 l.sw 0(r3),r4
14c: 9c 21 00 04 l.addi r1,r1,4
150: 44 00 48 00 l.jr r9
154: 84 21 ff fc l.lwz r1,-4(r1)
00000158 <load_long>:
158: d7 e1 0f fc l.sw -4(r1),r1
15c: 9c 21 ff fc l.addi r1,r1,-4
160: 85 63 00 00 l.lwz r11,0(r3)
164: 9c 21 00 04 l.addi r1,r1,4
168: 44 00 48 00 l.jr r9
16c: 84 21 ff fc l.lwz r1,-4(r1)
00000170 <store_long>:
170: d7 e1 0f fc l.sw -4(r1),r1
174: 9c 21 ff fc l.addi r1,r1,-4
178: 18 80 fe dc l.movhi r4,0xfedc
17c: a8 84 ba 98 l.ori r4,r4,0xba98
180: d4 03 20 00 l.sw 0(r3),r4
184: 9c 21 00 04 l.addi r1,r1,4
188: 44 00 48 00 l.jr r9
18c: 84 21 ff fc l.lwz r1,-4(r1)
00000190 <member>:
190: d7 e1 0f fc l.sw -4(r1),r1
194: 9c 21 ff fc l.addi r1,r1,-4
198: 9c 80 00 01 l.addi r4,r0,1
19c: d4 03 20 04 l.sw 4(r3),r4
1a0: 85 63 00 08 l.lwz r11,8(r3)
1a4: 9c 21 00 04 l.addi r1,r1,4
1a8: 44 00 48 00 l.jr r9
1ac: 84 21 ff fc l.lwz r1,-4(r1)
000001b0 <get_global>:
1b0: d7 e1 0f fc l.sw -4(r1),r1
1b4: 9c 21 ff fc l.addi r1,r1,-4
1b8: 18 60 00 00 l.movhi r3,0x0
1bc: a8 63 23 4c l.ori r3,r3,0x234c
1c0: 85 63 00 00 l.lwz r11,0(r3)
1c4: 9c 21 00 04 l.addi r1,r1,4
1c8: 44 00 48 00 l.jr r9
1cc: 84 21 ff fc l.lwz r1,-4(r1)
000001d0 <set_global>:
1d0: d7 e1 0f fc l.sw -4(r1),r1
1d4: 9c 21 ff fc l.addi r1,r1,-4
1d8: 18 80 00 00 l.movhi r4,0x0
1dc: a8 84 23 4c l.ori r4,r4,0x234c
1e0: d4 04 18 00 l.sw 0(r4),r3
1e4: 9c 21 00 04 l.addi r1,r1,4
1e8: 44 00 48 00 l.jr r9
1ec: 84 21 ff fc l.lwz r1,-4(r1)
000001f0 <set_stack>:
1f0: d7 e1 0f fc l.sw -4(r1),r1
1f4: 9c 21 ff f4 l.addi r1,r1,-12
1f8: 9c 60 00 fe l.addi r3,r0,254
1fc: d4 01 18 04 l.sw 4(r1),r3
200: 9c 60 00 ff l.addi r3,r0,255
204: d4 01 18 00 l.sw 0(r1),r3
208: 9c 21 00 0c l.addi r1,r1,12
20c: 44 00 48 00 l.jr r9
210: 84 21 ff fc l.lwz r1,-4(r1)
00000214 <use_stack>:
214: d7 e1 0f fc l.sw -4(r1),r1
218: 9c 21 ff f4 l.addi r1,r1,-12
21c: 9c 60 00 fe l.addi r3,r0,254
220: d4 01 18 04 l.sw 4(r1),r3
224: 9c 60 00 ff l.addi r3,r0,255
228: d4 01 18 00 l.sw 0(r1),r3
22c: 85 61 00 04 l.lwz r11,4(r1)
230: 84 61 00 00 l.lwz r3,0(r1)
234: e1 6b 18 00 l.add r11,r11,r3
238: 9c 21 00 0c l.addi r1,r1,12
23c: 44 00 48 00 l.jr r9
240: 84 21 ff fc l.lwz r1,-4(r1)
00000244 <call_null>:
244: d7 e1 4f fc l.sw -4(r1),r9
248: d7 e1 0f f8 l.sw -8(r1),r1
24c: 07 ff ff fe l.jal 244 <call_null>
250: 9c 21 ff f8 l.addi r1,r1,-8
254: 9c 21 00 08 l.addi r1,r1,8
258: 85 21 ff fc l.lwz r9,-4(r1)
25c: 44 00 48 00 l.jr r9
260: 84 21 ff f8 l.lwz r1,-8(r1)
00000264 <call_simple>:
264: d7 e1 0f fc l.sw -4(r1),r1
268: 9c 21 ff fc l.addi r1,r1,-4
26c: 9d 60 00 ff l.addi r11,r0,255
270: 9c 21 00 04 l.addi r1,r1,4
274: 44 00 48 00 l.jr r9
278: 84 21 ff fc l.lwz r1,-4(r1)
0000027c <call_complex>:
27c: d7 e1 0f fc l.sw -4(r1),r1
280: 9c 21 ff fc l.addi r1,r1,-4
284: 18 60 00 00 l.movhi r3,0x0
288: a8 63 23 4c l.ori r3,r3,0x234c
28c: d4 03 20 00 l.sw 0(r3),r4
290: a9 64 00 00 l.ori r11,r4,0x0
294: 9c 21 00 04 l.addi r1,r1,4
298: 44 00 48 00 l.jr r9
29c: 84 21 ff fc l.lwz r1,-4(r1)
000002a0 <call_pointer>:
2a0: d7 e1 4f fc l.sw -4(r1),r9
2a4: d7 e1 0f f8 l.sw -8(r1),r1
2a8: a9 60 fe d0 l.ori r11,r0,0xfed0
2ac: 48 00 58 00 l.jalr r11
2b0: 9c 21 ff f8 l.addi r1,r1,-8
2b4: 9c 21 00 08 l.addi r1,r1,8
2b8: 85 21 ff fc l.lwz r9,-4(r1)
2bc: 44 00 48 00 l.jr r9
2c0: 84 21 ff f8 l.lwz r1,-8(r1)
000002c4 <condition>:
2c4: d7 e1 0f fc l.sw -4(r1),r1
2c8: bc 03 00 00 l.sfeqi r3,0
2cc: 10 00 00 04 l.bf 2dc <condition+0x18>
2d0: 9c 21 ff fc l.addi r1,r1,-4
2d4: 9c 80 00 0a l.addi r4,r0,10
2d8: d4 03 20 00 l.sw 0(r3),r4
2dc: 9d 60 00 00 l.addi r11,r0,0
2e0: 9c 21 00 04 l.addi r1,r1,4
2e4: 44 00 48 00 l.jr r9
2e8: 84 21 ff fc l.lwz r1,-4(r1)
000002ec <loop>:
2ec: d7 e1 0f fc l.sw -4(r1),r1
2f0: bd a3 00 00 l.sflesi r3,0
2f4: 10 00 00 0c l.bf 324 <loop+0x38>
2f8: 9c 21 ff fc l.addi r1,r1,-4
2fc: 9c 80 00 00 l.addi r4,r0,0
300: a9 64 00 00 l.ori r11,r4,0x0
304: e1 6b 20 00 l.add r11,r11,r4
308: 9c 84 00 01 l.addi r4,r4,1
30c: e4 24 18 00 l.sfne r4,r3
310: 13 ff ff fe l.bf 308 <loop+0x1c>
314: e1 6b 20 00 l.add r11,r11,r4
318: e1 6b 20 02 l.sub r11,r11,r4
31c: 00 00 00 04 l.j 32c <loop+0x40>
320: 9c 21 00 04 l.addi r1,r1,4
324: 9d 60 00 00 l.addi r11,r0,0
328: 9c 21 00 04 l.addi r1,r1,4
32c: 44 00 48 00 l.jr r9
330: 84 21 ff fc l.lwz r1,-4(r1)
00000334 <main>:
334: d7 e1 0f fc l.sw -4(r1),r1
338: 9c 21 ff fc l.addi r1,r1,-4
33c: 9d 60 00 00 l.addi r11,r0,0
340: 9c 21 00 04 l.addi r1,r1,4
344: 44 00 48 00 l.jr r9
348: 84 21 ff fc l.lwz r1,-4(r1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.