- void *finishFunctionStub(const Function *F) {
- return MCE.finishFunctionStub(F);
- }
-
- void emitByte(unsigned char B) {
- MCE.emitByte(B);
- actual << B; actual.flush();
-
- values[counter] = (unsigned int) B;
- if (++counter % 4 == 0 && counter != 0) {
- o << std::hex;
- for (unsigned i=0; i<4; ++i) {
- if (values[i] < 16) o << "0";
- o << values[i] << " ";
- }
-
- o << std::dec << "\t";
- for (unsigned i=0; i<4; ++i) {
- for (int j=7; j>=0; --j) {
- o << ((values[i] >> j) & 1);
- }
- o << " ";
- }
-
- o << "\n";
-
- unsigned instr = 0;
- for (unsigned i=0; i<4; ++i)
- instr |= values[i] << (i*8);
-
- o << "--- * --- * --- * --- * ---\n";
- counter %= 4;
- }
- }
-
- void emitWord(unsigned W) {
- MCE.emitWord(W);
- }
- uint64_t getConstantPoolEntryAddress(unsigned Num) {
- return MCE.getConstantPoolEntryAddress(Num);
- }
- uint64_t getJumpTableEntryAddress(unsigned Num) {
- return MCE.getJumpTableEntryAddress(Num);
- }
- virtual unsigned char* allocateGlobal(unsigned size, unsigned alignment)
- { return MCE.allocateGlobal(size, alignment); }
-
- uint64_t getCurrentPCValue() {
- return MCE.getCurrentPCValue();
- }
- uint64_t getCurrentPCOffset() {
- return MCE.getCurrentPCOffset();
- }
- void addRelocation(const MachineRelocation &MR) {
- return MCE.addRelocation(MR);
- }
- };
-}