|
static final String | SPARC_CODE = "80a0400285c2600885e8200181e8000090102001d5f610162100000a860040020100000012bfffff10bfffffa00200090dbfffffd4206000d44e00162ac28003" |
|
static final String | SPARCV9_CODE = "81a80a2489a0102089a01a6089a000e0" |
|
Definition at line 9 of file TestSparc.java.
◆ hex() [1/2]
Definition at line 27 of file TestSparc.java.
28 return Integer.toString(
i, 16);
References i.
◆ hex() [2/2]
Definition at line 31 of file TestSparc.java.
32 return Long.toString(
i, 16);
References i.
◆ hexString2Byte()
static byte [] TestSparc.hexString2Byte |
( |
String |
s | ) |
|
|
inlinestaticpackage |
Definition at line 11 of file TestSparc.java.
14 byte[] data =
new byte[
len / 2];
15 for (
int i = 0;
i <
len;
i += 2) {
16 data[
i / 2] = (byte) ((Character.digit(
s.charAt(
i), 16) << 4)
17 + Character.digit(
s.charAt(
i+1), 16));
References i, len, and s.
Referenced by main().
◆ main()
static void TestSparc.main |
( |
String |
argv[] | ) |
|
|
inlinestatic |
Definition at line 68 of file TestSparc.java.
77 System.out.println(
new String(
new char[16]).
replace(
"\0",
"*"));
78 System.out.println(
"Platform: " +
test.comment);
80 System.out.println(
"Disasm:");
83 cs.setDetail(Capstone.CS_OPT_ON);
84 Capstone.CsInsn[] all_ins =
cs.disasm(
test.code, 0x1000);
86 for (
int j = 0; j < all_ins.length; j++) {
90 System.out.printf(
"0x%x:\n\n", (all_ins[all_ins.length-1].address + all_ins[all_ins.length-1].size));
static String stringToHex(byte[] code)
static void print_ins_detail(Capstone.CsInsn ins)
static final String SPARC_CODE
static byte[] hexString2Byte(String s)
static final String SPARCV9_CODE
int replace(char *string, const char *token, const char *fmt,...)
References test_arm.all_tests, cs, hexString2Byte(), i, print_ins_detail(), replace(), SPARC_CODE, SPARCV9_CODE, and TestBasic.stringToHex().
◆ print_ins_detail()
static void TestSparc.print_ins_detail |
( |
Capstone.CsInsn |
ins | ) |
|
|
inlinestatic |
Definition at line 35 of file TestSparc.java.
36 System.out.printf(
"0x%x:\t%s\t%s\n", ins.address, ins.mnemonic, ins.opStr);
41 System.out.printf(
"\top_count: %d\n",
operands.op.length);
45 System.out.printf(
"\t\toperands[%d].type: REG = %s\n",
c, ins.regName(
i.value.reg));
47 System.out.printf(
"\t\toperands[%d].type: IMM = 0x%x\n",
c,
i.value.imm);
49 System.out.printf(
"\t\toperands[%d].type: MEM\n",
c);
51 System.out.printf(
"\t\t\toperands[%d].mem.base: REG = %s\n",
c, ins.regName(
i.value.mem.base));
53 System.out.printf(
"\t\t\toperands[%d].mem.index: REG = %s\n",
c, ins.regName(
i.value.mem.index));
54 if (
i.value.mem.disp != 0)
55 System.out.printf(
"\t\t\toperands[%d].mem.disp: 0x%x\n",
c,
i.value.mem.disp);
61 System.out.printf(
"\tCode condition: %d\n",
operands.cc);
64 System.out.printf(
"\tHint code: %d\n",
operands.hint);
@ SPARC_OP_MEM
= CS_OP_MEM (Memory operand).
@ SPARC_OP_IMM
= CS_OP_IMM (Immediate operand).
@ SPARC_OP_REG
= CS_OP_REG (Register operand).
if(dbg->bits==RZ_SYS_BITS_64)
References c, i, if(), SPARC_OP_IMM, SPARC_OP_MEM, SPARC_OP_REG, and SPARC_REG_INVALID.
Referenced by main().
◆ cs
◆ SPARC_CODE
final String TestSparc.SPARC_CODE = "80a0400285c2600885e8200181e8000090102001d5f610162100000a860040020100000012bfffff10bfffffa00200090dbfffffd4206000d44e00162ac28003" |
|
staticpackage |
◆ SPARCV9_CODE
final String TestSparc.SPARCV9_CODE = "81a80a2489a0102089a01a6089a000e0" |
|
staticpackage |
The documentation for this class was generated from the following file: