From b33f1804ea54a31ce1638c84d29e43dd1ae1d787 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 11 Jan 2006 14:14:50 +0000 Subject: [PATCH] Faster/shorter way of aligning something. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15909 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/arch/ppc/arch_exceptions.S | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/system/kernel/arch/ppc/arch_exceptions.S b/src/system/kernel/arch/ppc/arch_exceptions.S index 45027ab326..4e6436b469 100644 --- a/src/system/kernel/arch/ppc/arch_exceptions.S +++ b/src/system/kernel/arch/ppc/arch_exceptions.S @@ -197,8 +197,7 @@ FUNCTION(ppc_exception_tail): mtcrf 0xff, %r0 /* align r1 to 8 bytes, so the iframe will be aligned too */ - li %r0, 0xfffffff8 - and %r1, %r1, %r0 + rlwinm %r1, %r1, 0, 0, 28 /* save the registers */ bl __save_regs @@ -210,8 +209,7 @@ FUNCTION(ppc_exception_tail): /* adjust the stack pointer for ABI compatibility */ subi %r1, %r1, 8 /* make sure there's space for the previous frame pointer and the return address */ - li %r2, 0xfffffff0 - and %r1, %r1, %r2 /* 16 byte align the stack pointer */ + rlwinm %r1, %r1, 0, 0, 27 /* 16 byte align the stack pointer */ li %r0, 0 stw %r0, 0(%r1) /* previous frame pointer: NULL */ /* 4(%r1) is room for the return address to be filled in by the