[PATCH] Adding skeleton for unit testing Hexagon Code Emission
Chad Rosier
mcrosier at codeaurora.org
Mon Sep 29 14:28:26 PDT 2014
Sorry for the multiple reviews.. Please address these as well.
================
Comment at: lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp:64
@@ +63,3 @@
+ HexagonMCInst const &HMB = static_cast<HexagonMCInst const &>(MI);
+ uint64_t Binary;
+ Binary = getBinaryCodeForInstr(HMB, Fixups, STI);
----------------
How about just:
uint64_t Binary = getBinaryCodeForInstr(HMB, Fixups, STI) | getPacketBits(HMB);
================
Comment at: lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp:67
@@ +66,3 @@
+ Binary |= getPacketBits(HMB);
+ assert(HMB.getDesc().getSize() == 4);
+ emitLittleEndian(Binary, OS);
----------------
assert(cond && "msg");
http://reviews.llvm.org/D5523
More information about the llvm-commits
mailing list