309 lines
4 KiB
Text
309 lines
4 KiB
Text
.section ".data"
|
|
.global x
|
|
.type x,#object
|
|
.size x,16
|
|
.align 4
|
|
x:
|
|
.word 0x1
|
|
.byte 0x2
|
|
.skip 3
|
|
.byte 0x0
|
|
.byte 0x34
|
|
.skip 2
|
|
.byte 0xa
|
|
.byte 0x6
|
|
.skip 2
|
|
.global i
|
|
.type i,#object
|
|
.size i,4
|
|
.align 4
|
|
i:
|
|
.word 0x10
|
|
.global y
|
|
.type y,#object
|
|
.size y,8
|
|
.align 4
|
|
y:
|
|
.byte 0xe0
|
|
.skip 3
|
|
.byte 0x0
|
|
.byte 0x0
|
|
.byte 0x0
|
|
.byte 0x9
|
|
.global main
|
|
.section ".text"
|
|
.align 4
|
|
main:
|
|
save %sp,-96,%sp
|
|
set .L4,%o0
|
|
set x,%i5
|
|
ld [%i5],%o1
|
|
set x+4,%i5
|
|
ldsb [%i5],%o2
|
|
set x+8,%i5
|
|
ld [%i5],%i5
|
|
sra %i5,20,%o3
|
|
set x+8,%i5
|
|
ld [%i5],%i5
|
|
sll %i5,12,%i5
|
|
sra %i5,28,%o4
|
|
set x+12,%i5
|
|
ld [%i5],%i5
|
|
sll %i5,4,%i5
|
|
sra %i5,29,%o5
|
|
set x+13,%i5
|
|
ldsb [%i5],%i5
|
|
st %i5,[%sp+4*6+68]
|
|
call printf; nop
|
|
set .L10,%o0
|
|
set y,%i5
|
|
ld [%i5],%i5
|
|
srl %i5,30,%i4
|
|
set 3,%i3
|
|
and %i4,%i3,%o1
|
|
srl %i5,26,%i5
|
|
set 15,%i4
|
|
and %i5,%i4,%o2
|
|
set y+4,%i5
|
|
ld [%i5],%o3
|
|
call printf; nop
|
|
set x+8,%i5
|
|
ld [%i5],%i4
|
|
set 0xfff0ffff,%i3
|
|
and %i4,%i3,%i4
|
|
set i,%i3
|
|
ld [%i3],%i3
|
|
sll %i3,28,%i3
|
|
sra %i3,28,%i3
|
|
sll %i3,16,%i3
|
|
set 0xf0000,%i2
|
|
and %i3,%i2,%i3
|
|
or %i4,%i3,%i4
|
|
st %i4,[%i5]
|
|
set x+12,%i5
|
|
ld [%i5],%i4
|
|
set 0xf1ffffff,%i3
|
|
and %i4,%i3,%i4
|
|
st %i4,[%i5]
|
|
set .L4,%o0
|
|
set x,%i5
|
|
ld [%i5],%o1
|
|
set x+4,%i5
|
|
ldsb [%i5],%o2
|
|
set x+8,%i5
|
|
ld [%i5],%i5
|
|
sra %i5,20,%o3
|
|
set x+8,%i5
|
|
ld [%i5],%i5
|
|
sll %i5,12,%i5
|
|
sra %i5,28,%o4
|
|
set x+12,%i5
|
|
ld [%i5],%i5
|
|
sll %i5,4,%i5
|
|
sra %i5,29,%o5
|
|
set x+13,%i5
|
|
ldsb [%i5],%i5
|
|
st %i5,[%sp+4*6+68]
|
|
call printf; nop
|
|
set y,%i5
|
|
ld [%i5],%i4
|
|
set 0x3fffffff,%i3
|
|
and %i4,%i3,%i4
|
|
set 0x80000000,%i3
|
|
or %i4,%i3,%i4
|
|
st %i4,[%i5]
|
|
set y+4,%i5
|
|
set i,%i4
|
|
ld [%i4],%i4
|
|
st %i4,[%i5]
|
|
set .L10,%o0
|
|
set y,%i5
|
|
ld [%i5],%i5
|
|
srl %i5,30,%i4
|
|
set 3,%i3
|
|
and %i4,%i3,%o1
|
|
srl %i5,26,%i5
|
|
set 15,%i4
|
|
and %i5,%i4,%o2
|
|
set y+4,%i5
|
|
ld [%i5],%o3
|
|
call printf; nop
|
|
set x,%o0
|
|
call f2; nop
|
|
mov %g0,%i0
|
|
.L3:
|
|
ret; restore
|
|
.type main,#function
|
|
.size main,.-main
|
|
.global f1
|
|
.align 4
|
|
f1:
|
|
save %sp,-96,%sp
|
|
ld [%i0],%i5
|
|
set 0xc3ffffff,%i4
|
|
and %i5,%i4,%i5
|
|
st %i5,[%i0]
|
|
ld [%i0],%i5
|
|
set 0x3fffffff,%i4
|
|
and %i5,%i4,%i5
|
|
set 3,%i4
|
|
and %g0,%i4,%i4
|
|
sll %i4,30,%i4
|
|
set 0xc0000000,%i3
|
|
and %i4,%i3,%i4
|
|
or %i5,%i4,%i5
|
|
st %i5,[%i0]
|
|
ld [%i0],%i5
|
|
set 0x3c000000,%i4
|
|
and %i5,%i4,%i5
|
|
cmp %i5,%g0; be .L22; nop
|
|
set .L24,%o0
|
|
call printf; nop
|
|
.L22:
|
|
ld [%i0],%i5
|
|
set 0xc0000000,%i4
|
|
or %i5,%i4,%i5
|
|
st %i5,[%i0]
|
|
ld [%i0],%i5
|
|
set 0x3c000000,%i4
|
|
or %i5,%i4,%i5
|
|
st %i5,[%i0]
|
|
set .L25,%o0
|
|
ld [%i0],%i5
|
|
srl %i5,30,%i4
|
|
set 3,%i3
|
|
and %i4,%i3,%o1
|
|
srl %i5,26,%i5
|
|
set 15,%i4
|
|
and %i5,%i4,%o2
|
|
call printf; nop
|
|
mov %g0,%i0
|
|
.L21:
|
|
ret; restore
|
|
.type f1,#function
|
|
.size f1,.-f1
|
|
.global f2
|
|
.align 4
|
|
f2:
|
|
save %sp,-96,%sp
|
|
set i,%i4
|
|
ld [%i4],%i4
|
|
cmp %i4,0; bne .L28; nop
|
|
set 1,%i5
|
|
ba .L29; nop
|
|
.L28:
|
|
mov %g0,%i5
|
|
.L29:
|
|
ld [%i0],%i4
|
|
set 0x3fffffff,%i3
|
|
and %i4,%i3,%i4
|
|
mov %i5,%i3
|
|
set 3,%i2
|
|
and %i3,%i2,%i3
|
|
sll %i3,30,%i3
|
|
set 0xc0000000,%i2
|
|
and %i3,%i2,%i3
|
|
or %i4,%i3,%i4
|
|
st %i4,[%i0]
|
|
mov %i0,%o0
|
|
call f1; nop
|
|
ld [%i0],%i4
|
|
set 0xc3ffffff,%i3
|
|
and %i4,%i3,%i4
|
|
mov %g0,%i3
|
|
set 15,%i2
|
|
and %i3,%i2,%i3
|
|
sll %i3,26,%i3
|
|
set 0x3c000000,%i2
|
|
and %i3,%i2,%i3
|
|
or %i4,%i3,%i4
|
|
st %i4,[%i0]
|
|
mov %g0,%i0
|
|
.L26:
|
|
ret; restore
|
|
.type f2,#function
|
|
.size f2,.-f2
|
|
.section ".rodata"
|
|
.align 1
|
|
.L25:
|
|
.byte 112
|
|
.byte 45
|
|
.byte 62
|
|
.byte 97
|
|
.byte 32
|
|
.byte 61
|
|
.byte 32
|
|
.byte 48
|
|
.byte 120
|
|
.byte 37
|
|
.byte 120
|
|
.byte 44
|
|
.byte 32
|
|
.byte 112
|
|
.byte 45
|
|
.byte 62
|
|
.byte 98
|
|
.byte 32
|
|
.byte 61
|
|
.byte 32
|
|
.byte 48
|
|
.byte 120
|
|
.byte 37
|
|
.byte 120
|
|
.byte 10
|
|
.byte 0
|
|
.align 1
|
|
.L24:
|
|
.byte 112
|
|
.byte 45
|
|
.byte 62
|
|
.byte 98
|
|
.byte 32
|
|
.byte 33
|
|
.byte 61
|
|
.byte 32
|
|
.byte 48
|
|
.byte 33
|
|
.byte 10
|
|
.byte 0
|
|
.align 1
|
|
.L10:
|
|
.byte 121
|
|
.byte 32
|
|
.byte 61
|
|
.byte 32
|
|
.byte 37
|
|
.byte 100
|
|
.byte 32
|
|
.byte 37
|
|
.byte 100
|
|
.byte 32
|
|
.byte 37
|
|
.byte 100
|
|
.byte 10
|
|
.byte 0
|
|
.align 1
|
|
.L4:
|
|
.byte 120
|
|
.byte 32
|
|
.byte 61
|
|
.byte 32
|
|
.byte 37
|
|
.byte 100
|
|
.byte 32
|
|
.byte 37
|
|
.byte 100
|
|
.byte 32
|
|
.byte 37
|
|
.byte 100
|
|
.byte 32
|
|
.byte 37
|
|
.byte 100
|
|
.byte 32
|
|
.byte 37
|
|
.byte 100
|
|
.byte 32
|
|
.byte 37
|
|
.byte 100
|
|
.byte 10
|
|
.byte 0
|