[llvm-commits] CVS: llvm/lib/Reoptimizer/BinInterface/sparc9.cpp sparc9.h sparcdis.cpp
Joel Stanley
jstanley at cs.uiuc.edu
Tue Apr 1 16:04:01 PST 2003
Changes in directory llvm/lib/Reoptimizer/BinInterface:
sparc9.cpp updated: 1.2 -> 1.3
sparc9.h updated: 1.8 -> 1.9
sparcdis.cpp updated: 1.6 -> 1.7
---
Log message:
Minor bug fixes.
---
Diffs of the changes:
Index: llvm/lib/Reoptimizer/BinInterface/sparc9.cpp
diff -u llvm/lib/Reoptimizer/BinInterface/sparc9.cpp:1.2 llvm/lib/Reoptimizer/BinInterface/sparc9.cpp:1.3
--- llvm/lib/Reoptimizer/BinInterface/sparc9.cpp:1.2 Sun Dec 15 05:07:33 2002
+++ llvm/lib/Reoptimizer/BinInterface/sparc9.cpp Tue Apr 1 16:13:35 2003
@@ -1,3 +1,4 @@
+
//*****************************************************************************
//
// Portable SPARC v9 Machine Code Definition Arrays
Index: llvm/lib/Reoptimizer/BinInterface/sparc9.h
diff -u llvm/lib/Reoptimizer/BinInterface/sparc9.h:1.8 llvm/lib/Reoptimizer/BinInterface/sparc9.h:1.9
--- llvm/lib/Reoptimizer/BinInterface/sparc9.h:1.8 Sun Dec 15 05:07:33 2002
+++ llvm/lib/Reoptimizer/BinInterface/sparc9.h Tue Apr 1 16:13:35 2003
@@ -307,7 +307,7 @@
#define OP3_STB 0x00000005 /* 0b000101 */
#define OP3_STH 0x00000006 /* 0b000110 */
#define OP3_STW 0x00000004 /* 0b000100 */
-#define OP3_STX 0x00000007 /* 0b000111 */
+#define OP3_STX 0x0000000E /* 0b001110 */ // Was 0b111 which is wrong (see pg 229 v9 spec)
#define OP3_LDSB 0x00000009 /* 0b001001 */
#define OP3_LDSH 0x0000000A /* 0b001010 */
#define OP3_LDSW 0x00000008 /* 0b001000 */
Index: llvm/lib/Reoptimizer/BinInterface/sparcdis.cpp
diff -u llvm/lib/Reoptimizer/BinInterface/sparcdis.cpp:1.6 llvm/lib/Reoptimizer/BinInterface/sparcdis.cpp:1.7
--- llvm/lib/Reoptimizer/BinInterface/sparcdis.cpp:1.6 Sun Dec 15 05:07:42 2002
+++ llvm/lib/Reoptimizer/BinInterface/sparcdis.cpp Tue Apr 1 16:13:35 2003
@@ -52,7 +52,7 @@
void sparc_printbr(unsigned instr, bool labels, int labelrs1, int labelrs2, int labelrd, int labelccf)
{
- // look at the OP2 field
+ // look at the OP2 field
if (RD_FLD(instr,INSTR_OP2)==OP2_ILLTRAP)
printf("ILLTRAP");
else if (RD_FLD(instr, INSTR_OP2)==OP2_SETHI)
@@ -84,6 +84,11 @@
RD_FLD(instr, INSTR_A) ? ",a" : "",
RD_FLD(instr, INSTR_DISP22));
}
+ else if (RD_FLD(instr, INSTR_OP2)==OP2_BPICC)
+ {
+ // TODO
+ printf("[BPICC -- currently not handled]");
+ }
else{
printf("Unknown:OP=0b00 OP2 = 0x%04X", RD_FLD(instr, INSTR_OP2));
assert(0);
@@ -118,6 +123,7 @@
{
//OP=OP_2: RD, OP_3 RS1: {I=0 -> X & RS2 ,I=1 ->
// {X=0 -> SHCNT32 X=1->SHCNT64 }}
+
if (RD_FLD(instr, INSTR_I)==0)
{
printf("%s%d ", (RD_FLD(instr, INSTR_X)==0 ? 32 : 64));
@@ -130,14 +136,15 @@
}
else
{
- printf("%s%d ", (RD_FLD(instr, INSTR_X)==0 ? 32 : 64));
- if (!labels)
- printf("%s, ", reg_names[RD_FLD(instr, INSTR_RD)]);
+ printf("%s%s ", basename, (RD_FLD(instr, INSTR_X)==0 ? "" : "x"));
sparc_printop_rs1(instr, labelrs1);
- printf(", 0x%04X", (RD_FLD(instr, INSTR_X)==0
+
+ printf(", 0x%04X, ", (RD_FLD(instr, INSTR_X)==0
? RD_FLD(instr, INSTR_SHCNT32)
: RD_FLD(instr, INSTR_SHCNT64)));
+ if (!labels)
+ printf("%s", reg_names[RD_FLD(instr, INSTR_RD)]);
}
}
More information about the llvm-commits
mailing list