holey-bytes/hblang/tests/codegen_tests_c_strings.txt

46 lines
850 B
Plaintext
Raw Normal View History

2024-09-03 15:34:17 -05:00
main:
ADDI64 r254, r254, -24d
ST r31, r254, 0a, 24h
2024-09-04 11:48:25 -05:00
LRA r32, r0, :abඞ
56789
2024-09-03 15:34:17 -05:00
CP r2, r32
JAL r31, r0, :str_len
CP r32, r1
2024-09-04 11:48:25 -05:00
LRA r33, r0, :fff
2024-09-03 15:34:17 -05:00
CP r2, r33
JAL r31, r0, :str_len
CP r33, r1
ADD64 r33, r33, r32
CP r1, r33
LD r31, r254, 0a, 24h
ADDI64 r254, r254, 24d
JALA r0, r31, 0a
str_len:
ADDI64 r254, r254, -40d
ST r31, r254, 0a, 40h
CP r32, r2
LI64 r33, 0d
2: CP r34, r32
CP r35, r0
LD r35, r34, 0a, 1h
LI64 r34, 0d
CMPU r35, r35, r34
CMPUI r35, r35, 0d
NOT r35, r35
JEQ r35, r0, :0
JMP :1
0: CP r35, r33
ADDI64 r35, r35, 1d
CP r33, r35
CP r35, r32
ADDI64 r35, r35, 1d
CP r32, r35
JMP :2
1: CP r1, r33
LD r31, r254, 0a, 40h
ADDI64 r254, r254, 40d
JALA r0, r31, 0a
2024-09-01 19:38:11 -05:00
code size: 303
2024-07-07 06:42:48 -05:00
ret: 16
status: Ok(())