diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2015-03-07 20:27:00 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2015-03-07 20:27:00 +0000 |
commit | ac9d1569a38a2eee2a36d31b4274cd08240140dd (patch) | |
tree | bdce8a775784730644095aac825f69c4aed31b5d | |
parent | fd67077071422de4142fee1a503eb3f51ae23a26 (diff) | |
download | FreeBSD-src-ac9d1569a38a2eee2a36d31b4274cd08240140dd.zip FreeBSD-src-ac9d1569a38a2eee2a36d31b4274cd08240140dd.tar.gz |
Make assembly slightly more idiomatic (and able to be handled by clang's
integrated assembler).
-rw-r--r-- | sys/powerpc/aim/trap_subr64.S | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/powerpc/aim/trap_subr64.S b/sys/powerpc/aim/trap_subr64.S index 81a7679..5f53155 100644 --- a/sys/powerpc/aim/trap_subr64.S +++ b/sys/powerpc/aim/trap_subr64.S @@ -62,7 +62,7 @@ restore_usersrs: clrrdi %r31,%r31,28 slbie %r31 1: ld %r31, 0(%r28) /* Load SLB entry pointer */ - cmpli 0, %r31, 0 /* If NULL, stop */ + cmpdi %r31, 0 /* If NULL, stop */ beqlr ld %r30, 0(%r31) /* Load SLBV */ @@ -86,18 +86,18 @@ restore_kernsrs: slbmfee %r31,%r29 clrrdi %r31,%r31,28 slbie %r31 -1: cmpli 0, %r29, USER_SLB_SLOT /* Skip the user slot */ +1: cmpdi %r29, USER_SLB_SLOT /* Skip the user slot */ beq- 2f ld %r31, 8(%r28) /* Load SLBE */ - cmpli 0, %r31, 0 /* If SLBE is not valid, stop */ + cmpdi %r31, 0 /* If SLBE is not valid, stop */ beqlr ld %r30, 0(%r28) /* Load SLBV */ slbmte %r30, %r31 /* Install SLB entry */ 2: addi %r28, %r28, 16 /* Advance pointer */ addi %r29, %r29, 1 - cmpli 0, %r29, 64 /* Repeat if we are not at the end */ + cmpdi %r29, 64 /* Repeat if we are not at the end */ blt 1b blr @@ -356,8 +356,7 @@ CNAME(trapcode): mtsprg1 %r1 /* save SP */ mflr %r1 /* Save the old LR in r1 */ mtsprg2 %r1 /* And then in SPRG2 */ - li %r1,TRAP_GENTRAP - ld %r1,0(%r1) + ld %r1,TRAP_GENTRAP(0) mtlr %r1 li %r1, 0xe0 /* How to get the vector from LR */ blrl /* Branch to generictrap */ @@ -791,8 +790,7 @@ dbtrap: andi. %r1,%r1,0xff00 mtsprg3 %r1 - li %r1,TRAP_TOCBASE /* get new SP */ - ld %r1,0(%r1) + ld %r1,TRAP_TOCBASE(0) /* get new SP */ ld %r1,TOC_REF(tmpstk)(%r1) addi %r1,%r1,(TMPSTKSZ-48) |