public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Fix Frysk assembly for PowerPC 32-bit and 64-bit.
@ 2008-04-16 21:36 bauermann
  0 siblings, 0 replies; only message in thread
From: bauermann @ 2008-04-16 21:36 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  08db4df075e0d7461c6cb91b48743440028425ab (commit)
      from  0732bb7177854c12cfc978bb720cca7ea1838924 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 08db4df075e0d7461c6cb91b48743440028425ab
Author: Thiago Jung Bauermann <bauerman@br.ibm.com>
Date:   Wed Apr 16 18:33:24 2008 -0300

    Fix Frysk assembly for PowerPC 32-bit and 64-bit.
    
    frysk-imports/include/ChangeLog
    2008-04-16  Thiago Jung Bauermann  <bauerman@br.ibm.com>
    
    	* frysk-asm.h (ILLEGAL_INSTRUCTION): Use 0 as illegal insn.
    	* (LOAD_WORD): Add version for PowerPC64.  Use correct insn
    	for PowerPC32.
    	* (STORE_WORD): Add version for PowerPC64.
    	* (LOAD_BYTE): Use correct insn.
    	* (COMPARE): Add version for PowerPC64.

-----------------------------------------------------------------------

Summary of changes:
 frysk-imports/include/ChangeLog   |    9 +++++++++
 frysk-imports/include/frysk-asm.h |   22 ++++++++++++++--------
 2 files changed, 23 insertions(+), 8 deletions(-)

First 500 lines of diff:
diff --git a/frysk-imports/include/ChangeLog b/frysk-imports/include/ChangeLog
index d032d0b..2b95bb8 100644
--- a/frysk-imports/include/ChangeLog
+++ b/frysk-imports/include/ChangeLog
@@ -1,3 +1,12 @@
+2008-04-16  Thiago Jung Bauermann  <bauerman@br.ibm.com>
+
+	* frysk-asm.h (ILLEGAL_INSTRUCTION): Use 0 as illegal insn.
+	* (LOAD_WORD): Add version for PowerPC64.  Use correct insn
+	for PowerPC32.
+	* (STORE_WORD): Add version for PowerPC64.
+	* (LOAD_BYTE): Use correct insn.
+	* (COMPARE): Add version for PowerPC64.
+
 2008-04-04  Andrew Cagney  <cagney@redhat.com>
 
 	* frysk-asm.h (LOAD_WORD): Replace LOAD.
diff --git a/frysk-imports/include/frysk-asm.h b/frysk-imports/include/frysk-asm.h
index 81c063a..b00377d 100644
--- a/frysk-imports/include/frysk-asm.h
+++ b/frysk-imports/include/frysk-asm.h
@@ -185,7 +185,7 @@
 #elif defined __x86_64__
 #  define ILLEGAL_INSTRUCTION .word 0xffff
 #elif defined __powerpc__
-#  define ILLEGAL_INSTRUCTION .4byte 0xffffffff
+#  define ILLEGAL_INSTRUCTION .4byte 0
 #else
 #  warning "No no-operation instruction defined"
 #endif
@@ -205,14 +205,18 @@
 
 #if defined __x86__
 #  define LOAD_WORD(DEST_REG,BASE_REG) mov (BASE_REG), DEST_REG
+#elif defined __powerpc64__
+#  define LOAD_WORD(DEST_REG,BASE_REG) ld DEST_REG, 0(BASE_REG)
 #elif defined __powerpc__
-#  define LOAD_WORD(DEST_REG,BASE_REG) ldw DEST_REG, 0(BASE_REG)
+#  define LOAD_WORD(DEST_REG,BASE_REG) lwz DEST_REG, 0(BASE_REG)
 #else
 #  warning "No load instruction defined"
 #endif
 
 #if defined __x86__
 #  define STORE_WORD(SOURCE_REG,BASE_REG) mov SOURCE_REG, (BASE_REG)
+#elif defined __powerpc64__
+#  define STORE_WORD(SOURCE_REG,BASE_REG) std SOURCE_REG, 0(BASE_REG)
 #elif defined __powerpc__
 #  define STORE_WORD(SOURCE_REG,BASE_REG) stw SOURCE_REG, 0(BASE_REG)
 #else
@@ -225,7 +229,7 @@
 #if defined __x86__
 #  define LOAD_BYTE(DEST_REG,BASE_REG) movb (BASE_REG), DEST_REG
 #elif defined __powerpc__
-#  define LOAD_BYTE(DEST_REG,BASE_REG) ldb DEST_REG, 0(BASE_REG)
+#  define LOAD_BYTE(DEST_REG,BASE_REG) lbz DEST_REG, 0(BASE_REG)
 #else
 #  warning "No load instruction defined"
 #endif
@@ -356,6 +360,8 @@
 #  define COMPARE(LHS_REG,RHS_REG) cmpl LHS_REG, RHS_REG
 #elif defined __x86_64__
 #  define COMPARE(LHS_REG,RHS_REG) cmpq LHS_REG, RHS_REG
+#elif defined __powerpc64__
+#  define COMPARE(LHS_REG,RHS_REG) cmpd cr7, LHS_REG, RHS_REG
 #elif defined __powerpc__
 #  define COMPARE(LHS_REG,RHS_REG) cmpw cr7, LHS_REG, RHS_REG
 #else
@@ -396,10 +402,10 @@
 #if defined __x86__
 #  define JUMP_REG(REG) jmp *REG
 #elif defined __powerpc__
-// PowerPC do not have a instructio for jumping for a REG,
-// so the solution is to use a special reg (here counter reg)
-// copy the value to him, and them jump. The problem is that you
-// will lose the old value of CTR reg.
+// PowerPC does not have an instruction for jumping to the address
+// in a REG, so the solution is to use a special reg (here counter
+// reg) copy the value to it, and them jump. The problem is that
+// you will lose the old value of CTR reg.
 #  define JUMP_REG(REG) mtctr REG; bctrl
 #else
 #  warning "No indirect or register jump instruction defined"
@@ -407,7 +413,7 @@
 
 \f
 
-// Host ABI calling convetion instructions.
+// Host ABI calling convention instructions.
 
 // This collection of compound instructions let assembler code work
 // with the host's ABI's "traditional" function calling convention.


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-16 21:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-16 21:36 [SCM] master: Fix Frysk assembly for PowerPC 32-bit and 64-bit bauermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).