e7e29d34ff
possible values. Add the PowerPC ncg and mcg backend support to let the test actually run, including modifying a bunch of PowrePC libem functions so that they can be called from both ncg and mcg.
27 lines
440 B
ArmAsm
27 lines
440 B
ArmAsm
#include "powerpc.h"
|
|
|
|
.sect .text
|
|
|
|
! Set union.
|
|
! Stack: ( size b a -- a+b )
|
|
|
|
.define .ior
|
|
.ior:
|
|
lwz r3, 0 (sp)
|
|
addi sp, sp, 4
|
|
|
|
mr r4, sp ! r4 = ptr to set a
|
|
add r5, sp, r3 ! r5 = ptr to set b
|
|
rlwinm r6, r3, 30, 2, 31
|
|
mtspr ctr, r6 ! ctr = r3 / 4
|
|
1:
|
|
lwz r7, 0(r4)
|
|
lwz r8, 0(r5)
|
|
or r8, r7, r8 ! union of words
|
|
stw r8, 0(r5)
|
|
addi r4, r4, 4
|
|
addi r5, r5, 4
|
|
bc DNZ, 0, 1b ! loop ctr times
|
|
add sp, sp, r3
|
|
bclr ALWAYS, 0, 0
|