46 const char *
gpr_regs[] = {
"g0",
"g1",
"g2",
"g3",
"g4",
"g5",
"g6",
"g7",
47 "o0",
"o1",
"o2",
"o3",
"o4",
"o5",
"o6",
"o7",
48 "l0",
"l1",
"l2",
"l3",
"l4",
"l5",
"l6",
"l7",
49 "i0",
"i1",
"i2",
"i3",
"i4",
"i5",
"i6",
"i7" };
143 #define X_OP(i) (((i) >> 30) & 0x3)
144 #define X_OP2(i) (((i) >> 22) & 0x7)
145 #define X_OP3(i) (((i) >> 19) & 0x3f)
146 #define X_COND(i) (((i) >> 25) & 0x1f)
148 #define X_RD(i) (((i) >> 25) & 0x1f)
149 #define X_RS1(i) (((i) >> 14) & 0x1f)
150 #define X_LDST_I(i) (((i) >> 13) & 1)
151 #define X_ASI(i) (((i) >> 5) & 0xff)
152 #define X_RS2(i) (((i) >> 0) & 0x1f)
153 #define X_IMM(i, n) (((i) >> 0) & ((1 << (n)) - 1))
154 #define X_SIMM(i, n) SIGN_EXT(X_IMM((i), (n)), (n))
155 #define X_DISP22(i) (((i) >> 0) & 0x3fffff)
156 #define X_IMM22(i) X_DISP22(i)
157 #define X_DISP30(i) (((i) >> 0) & 0x3fffffff)
160 #define X_DISP16(i) (((((i) >> 20) & 3) << 14) | (((i) >> 0) & 0x3fff))
161 #define X_DISP19(i) (((i) >> 0) & 0x7ffff)
162 #define X_MEMBAR(i) ((i)&0x7f)
274 return (
st64)((insn & ~
mask) | (((insn & ((
ut64)1 << nbit)) >> nbit) *
mask));
376 ((
char *)&insn)[0] = data[3];
377 ((
char *)&insn)[1] = data[2];
378 ((
char *)&insn)[2] = data[1];
379 ((
char *)&insn)[3] = data[0];
385 switch (
X_OP2(insn)) {
402 switch (
X_OP3(insn)) {
412 if (
X_RD(insn) == 1) {
418 if (
X_RS1(insn) == 1) {
424 if (
X_RS1(insn) != 0) {
435 switch (
X_OP3(insn)) {
508 "gpr ccr .64 256 0\n"
510 "gpr ncp .64 272 0\n"
512 "gpr asi .64 288 0\n"
513 "gpr fprs .64 296 0\n"
515 "fpu sf0 .32 304 0\n"
516 "fpu sf1 .32 308 0\n"
517 "fpu sf2 .32 312 0\n"
518 "fpu sf3 .32 316 0\n"
519 "fpu sf4 .32 320 0\n"
520 "fpu sf5 .32 324 0\n"
521 "fpu sf6 .32 328 0\n"
522 "fpu sf7 .32 332 0\n"
523 "fpu sf8 .32 336 0\n"
524 "fpu sf9 .32 340 0\n"
525 "fpu sf10 .32 344 0\n"
526 "fpu sf11 .32 348 0\n"
527 "fpu sf12 .32 352 0\n"
528 "fpu sf13 .32 356 0\n"
529 "fpu sf14 .32 360 0\n"
530 "fpu sf15 .32 364 0\n"
531 "fpu sf16 .32 368 0\n"
532 "fpu sf17 .32 372 0\n"
533 "fpu sf18 .32 376 0\n"
534 "fpu sf19 .32 380 0\n"
535 "fpu sf20 .32 384 0\n"
536 "fpu sf21 .32 388 0\n"
537 "fpu sf22 .32 392 0\n"
538 "fpu sf23 .32 396 0\n"
539 "fpu sf24 .32 400 0\n"
540 "fpu sf25 .32 404 0\n"
541 "fpu sf26 .32 408 0\n"
542 "fpu sf27 .32 412 0\n"
543 "fpu sf28 .32 416 0\n"
544 "fpu sf29 .32 420 0\n"
545 "fpu sf30 .32 424 0\n"
546 "fpu sf31 .32 428 0\n"
547 "fpu df0 .64 304 0\n"
548 "fpu df2 .64 312 0\n"
549 "fpu df4 .64 320 0\n"
550 "fpu df6 .64 328 0\n"
551 "fpu df8 .64 336 0\n"
552 "fpu df10 .64 344 0\n"
553 "fpu df12 .64 352 0\n"
554 "fpu df14 .64 360 0\n"
555 "fpu df16 .64 368 0\n"
556 "fpu df18 .64 376 0\n"
557 "fpu df20 .64 384 0\n"
558 "fpu df22 .64 392 0\n"
559 "fpu df24 .64 400 0\n"
560 "fpu df26 .64 408 0\n"
561 "fpu df28 .64 416 0\n"
562 "fpu df30 .64 424 0\n"
563 "fpu df32 .64 432 0\n"
564 "fpu df34 .64 440 0\n"
565 "fpu df36 .64 448 0\n"
566 "fpu df38 .64 456 0\n"
567 "fpu df40 .64 464 0\n"
568 "fpu df42 .64 472 0\n"
569 "fpu df44 .64 480 0\n"
570 "fpu df46 .64 488 0\n"
571 "fpu df48 .64 496 0\n"
572 "fpu df50 .64 504 0\n"
573 "fpu df52 .64 512 0\n"
574 "fpu df54 .64 520 0\n"
575 "fpu df56 .64 528 0\n"
576 "fpu df58 .64 536 0\n"
577 "fpu df60 .64 544 0\n"
578 "fpu df62 .64 552 0\n"
579 "fpu qf0 .128 304 0\n"
580 "fpu qf4 .128 320 0\n"
581 "fpu qf8 .128 336 0\n"
582 "fpu qf12 .128 352 0\n"
583 "fpu qf16 .128 368 0\n"
584 "fpu qf20 .128 384 0\n"
585 "fpu qf24 .128 400 0\n"
586 "fpu qf28 .128 416 0\n"
587 "fpu qf32 .128 432 0\n"
588 "fpu qf36 .128 448 0\n"
589 "fpu qf40 .128 464 0\n"
590 "fpu qf44 .128 480 0\n"
591 "fpu qf48 .128 496 0\n"
592 "fpu qf52 .128 512 0\n"
593 "fpu qf56 .128 528 0\n"
594 "fpu qf60 .128 544 0\n"
595 "gpr fsr .64 560 0\n";
606 .desc =
"SPARC analysis plugin",
615 #ifndef RZ_PLUGIN_INCORE
RZ_API RzAnalysisValue * rz_analysis_value_new(void)
RzAnalysisPlugin rz_analysis_plugin_sparc_gnu
static char * get_reg_profile(RzAnalysis *analysis)
static int fcc_to_r_cond(const int cond)
static st64 get_immed_sgnext(const ut64 insn, const ut8 nbit)
static RzAnalysisValue * value_fill_addr_reg_regdelta(RzAnalysis const *const analysis, const int ireg, const int iregdelta)
static RzAnalysisValue * value_fill_addr_pc_disp(const ut64 addr, const st64 disp)
RZ_API RzLibStruct rizin_plugin
static int icc_to_r_cond(const int cond)
static void analysis_jmpl(RzAnalysis const *const analysis, RzAnalysisOp *op, const ut32 insn, const ut64 addr)
static RzAnalysisValue * value_fill_addr_reg_disp(RzAnalysis const *const analysis, const int ireg, const st64 disp)
static int archinfo(RzAnalysis *analysis, int q)
static void analysis_call(RzAnalysisOp *op, const ut32 insn, const ut64 addr)
static int sparc_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *data, int len, RzAnalysisOpMask mask)
static void analysis_branch(RzAnalysisOp *op, const ut32 insn, const ut64 addr)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
RZ_API RzRegItem * rz_reg_get(RzReg *reg, const char *name, int type)
@ RZ_ANALYSIS_OP_FAMILY_CPU
@ RZ_ANALYSIS_OP_TYPE_JMP
@ RZ_ANALYSIS_OP_TYPE_UJMP
@ RZ_ANALYSIS_OP_TYPE_CALL
@ RZ_ANALYSIS_OP_TYPE_CJMP
@ RZ_ANALYSIS_OP_TYPE_ILL
@ RZ_ANALYSIS_OP_TYPE_UCALL
@ RZ_ANALYSIS_OP_TYPE_RET
@ RZ_ANALYSIS_OP_TYPE_NOP
@ RZ_TYPE_COND_LE
Less or equal.
@ RZ_TYPE_COND_GE
Greater or equal.
@ RZ_TYPE_COND_NE
Not equal.
@ RZ_TYPE_COND_GT
Greater than.
@ RZ_TYPE_COND_LT
Less than.
#define cond(bop, top, mask, flags)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()