|
static final String | ARM64_CODE = "090038d5bf4000d50c0513d52050020e20e43d0f0018a05fa200ae9e9f3703d5bf3303d5df3f03d5217c029b217c00530040214be10b40b9200481da2008028b105be83c" |
|
Definition at line 9 of file TestArm64.java.
◆ hex() [1/2]
◆ hex() [2/2]
Definition at line 30 of file TestArm64.java.
31 return Long.toString(
i, 16);
References i.
◆ hexString2Byte()
static byte [] TestArm64.hexString2Byte |
( |
String |
s | ) |
|
|
inlinestaticpackage |
Definition at line 11 of file TestArm64.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 TestArm64.main |
( |
String |
argv[] | ) |
|
|
inlinestatic |
Definition at line 97 of file TestArm64.java.
105 System.out.println(
new String(
new char[16]).
replace(
"\0",
"*"));
106 System.out.println(
"Platform: " +
test.comment);
108 System.out.println(
"Disasm:");
111 cs.setDetail(Capstone.CS_OPT_ON);
112 Capstone.CsInsn[] all_ins =
cs.disasm(
test.code, 0x2c);
114 for (
int j = 0; j < all_ins.length; j++) {
116 System.out.println();
119 System.out.printf(
"0x%x: \n\n", all_ins[all_ins.length-1].address + all_ins[all_ins.length-1].size);
static void print_ins_detail(Capstone.CsInsn ins)
static byte[] hexString2Byte(String s)
static final String ARM64_CODE
static String stringToHex(byte[] code)
int replace(char *string, const char *token, const char *fmt,...)
References test_arm.all_tests, ARM64_CODE, cs, hexString2Byte(), i, print_ins_detail(), replace(), and TestBasic.stringToHex().
◆ print_ins_detail()
static void TestArm64.print_ins_detail |
( |
Capstone.CsInsn |
ins | ) |
|
|
inlinestatic |
Definition at line 34 of file TestArm64.java.
35 System.out.printf(
"0x%x:\t%s\t%s\n", ins.address, ins.mnemonic, ins.opStr);
40 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: REG_MRS = 0x%x\n",
c,
i.value.reg);
49 System.out.printf(
"\t\toperands[%d].type: REG_MSR = 0x%x\n",
c,
i.value.reg);
51 System.out.printf(
"\t\toperands[%d].type: PSTATE = 0x%x\n",
c,
i.value.imm);
53 System.out.printf(
"\t\toperands[%d].type: BARRIER = 0x%x\n",
c,
i.value.imm);
56 System.out.printf(
"\t\toperands[%d].type: IMM = 0x%x\n",
c,
i.value.imm);
58 System.out.printf(
"\t\toperands[%d].type: C-IMM = %d\n",
c,
i.value.imm);
60 System.out.printf(
"\t\toperands[%d].type: FP = %f\n",
c,
i.value.fp);
62 System.out.printf(
"\t\toperands[%d].type: MEM\n",
c);
63 String base = ins.regName(
i.value.mem.base);
64 String index = ins.regName(
i.value.mem.index);
66 System.out.printf(
"\t\t\toperands[%d].mem.base: REG = %s\n",
c, base);
68 System.out.printf(
"\t\t\toperands[%d].mem.index: REG = %s\n",
c, index);
69 if (
i.value.mem.disp != 0)
70 System.out.printf(
"\t\t\toperands[%d].mem.disp: 0x%x\n",
c,
i.value.mem.disp);
73 System.out.printf(
"\t\t\tShift: type = %d, value = %d\n",
i.shift.type,
i.shift.value);
75 System.out.printf(
"\t\t\tExt: %d\n",
i.ext);
77 System.out.printf(
"\t\t\tVector Arrangement Specifier: 0x%x\n",
i.vas);
79 System.out.printf(
"\t\t\tVector Element Size Specifier: %d\n",
i.vess);
80 if (
i.vector_index != -1)
81 System.out.printf(
"\t\t\tVector Index: %d\n",
i.vector_index);
87 System.out.println(
"\tWrite-back: True");
90 System.out.println(
"\tUpdate-flags: True");
93 System.out.printf(
"\tCode-condition: %d\n",
operands.cc);
@ ARM64_OP_FP
= CS_OP_FP (Floating-Point operand).
@ ARM64_OP_PSTATE
PState operand.
@ ARM64_OP_BARRIER
Memory barrier operand (ISB/DMB/DSB instructions).
@ ARM64_OP_REG
= CS_OP_REG (Register operand).
@ ARM64_OP_MEM
= CS_OP_MEM (Memory operand).
@ ARM64_OP_REG_MRS
MRS register operand.
@ ARM64_OP_CIMM
C-Immediate.
@ ARM64_OP_IMM
= CS_OP_IMM (Immediate operand).
@ ARM64_OP_REG_MSR
MSR register operand.
@ ARM64_CC_AL
Always (unconditional): Always (unconditional)
if(dbg->bits==RZ_SYS_BITS_64)
References ARM64_CC_AL, ARM64_CC_INVALID, ARM64_EXT_INVALID, ARM64_OP_BARRIER, ARM64_OP_CIMM, ARM64_OP_FP, ARM64_OP_IMM, ARM64_OP_MEM, ARM64_OP_PSTATE, ARM64_OP_REG, ARM64_OP_REG_MRS, ARM64_OP_REG_MSR, ARM64_SFT_INVALID, ARM64_VAS_INVALID, ARM64_VESS_INVALID, c, hex(), i, if(), and imm.
Referenced by main().
◆ ARM64_CODE
final String TestArm64.ARM64_CODE = "090038d5bf4000d50c0513d52050020e20e43d0f0018a05fa200ae9e9f3703d5bf3303d5df3f03d5217c029b217c00530040214be10b40b9200481da2008028b105be83c" |
|
staticpackage |
◆ cs
The documentation for this class was generated from the following file: