/* * libbinrec: a recompiling translator for machine code * Copyright (c) 2016 Andrew Church * * This software may be copied and redistributed under certain conditions; * see the file "COPYING" in the source code distribution for details. * NO WARRANTY is provided with this software. */ #include "tests/guest-ppc/insn/common.h" static const uint8_t input[] = { 0xFC,0x02,0x0D,0x8E, // mtfsf 1,f1 }; static const unsigned int guest_opt = 0; static const unsigned int common_opt = 0; static const bool expected_success = true; static const char expected[] = "[info] Scanning terminated at requested limit 0x3\n" " 0: LOAD_ARG r1, 0\n" " 1: LOAD_ARG r2, 1\n" " 2: GET_ALIAS r3, a2\n" " 3: BITCAST r4, r3\n" " 4: ZCAST r5, r4\n" " 5: GET_ALIAS r6, a3\n" " 6: ANDI r7, r5, 15\n" " 7: ANDI r8, r6, -16\n" " 8: OR r9, r8, r7\n" " 9: SET_ALIAS a3, r9\n" " 10: FGETSTATE r10\n" " 11: ANDI r11, r9, 3\n" " 12: GOTO_IF_Z r11, L1\n" " 13: SLTUI r12, r11, 2\n" " 14: GOTO_IF_NZ r12, L2\n" " 15: SEQI r13, r11, 2\n" " 16: GOTO_IF_NZ r13, L3\n" " 17: FSETROUND r14, r10, FLOOR\n" " 18: FSETSTATE r14\n" " 19: GOTO L4\n" " 20: LABEL L3\n" " 21: FSETROUND r15, r10, CEIL\n" " 22: FSETSTATE r15\n" " 23: GOTO L4\n" " 24: LABEL L2\n" " 25: FSETROUND r16, r10, TRUNC\n" " 26: FSETSTATE r16\n" " 27: GOTO L4\n" " 28: LABEL L1\n" " 29: FSETROUND r17, r10, NEAREST\n" " 30: FSETSTATE r17\n" " 31: LABEL L4\n" " 32: LOAD_IMM r18, 4\n" " 33: SET_ALIAS a1, r18\n" " 34: RETURN r1\n" "\n" "Alias 1: int32 @ 964(r1)\n" "Alias 2: float64 @ 400(r1)\n" "Alias 3: int32 @ 944(r1)\n" "\n" "Block 0: --> [0,12] --> 1,6\n" "Block 1: 0 --> [13,14] --> 2,5\n" "Block 2: 1 --> [15,16] --> 3,4\n" "Block 3: 2 --> [17,19] --> 7\n" "Block 4: 2 --> [20,23] --> 7\n" "Block 5: 1 --> [24,27] --> 7\n" "Block 6: 0 --> [28,30] --> 7\n" "Block 7: 6,3,4,5 --> [31,34] --> \n" ; #include "tests/rtl-disasm-test.i"