c578c495bb
Remove one addi instruction from some loops. These loops had
increased 2 pointers, they now increase 1 index. I must initialize
the index, so I add "li r6, 0" before each loop.
Change .zer to use subf instead of neg, add.
Change .xor to take the size on the real stack, as .and and .or have
done since 81c677d
.
20 lines
354 B
ArmAsm
20 lines
354 B
ArmAsm
.sect .text
|
|
|
|
! Create empty set.
|
|
! Stack: ( size -- set )
|
|
|
|
.define .zer
|
|
.zer:
|
|
lwz r3, 0(sp) ! r3 = size
|
|
srwi r5, r3, 2
|
|
mtspr ctr, r5 ! ctr = word size - 4
|
|
li r4, 0 ! r4 = 0
|
|
addi sp, sp, 4
|
|
subf sp, r3, sp ! sp = ptr to new set
|
|
li r6, 0 ! r6 = index
|
|
1:
|
|
stwx r4, sp, r6 ! store zero in set
|
|
addi r6, r6, 4
|
|
bdnz 1b ! loop ctr times
|
|
blr
|