always_assert when we run out of TC space

Makes debugging easier.
Esse commit está contido em:
aravind
2013-07-15 11:32:59 -07:00
commit de Sara Golemon
commit b5f608b942
2 arquivos alterados com 6 adições e 6 exclusões
+1 -1
Ver Arquivo
@@ -2932,7 +2932,7 @@ TranslatorX64::emitNativeTrampoline(TCA helperAddr) {
// helper address and emitCall will the emit the right sequence
// to call it indirectly
TRACE(1, "Ran out of space to emit a trampoline for %p\n", helperAddr);
assert(false);
always_assert(false);
return helperAddr;
}
uint32_t index = m_numNativeTrampolines++;
+5 -5
Ver Arquivo
@@ -559,32 +559,32 @@ struct DataBlock {
}
void byte(const uint8_t byte) {
assert(canEmit(sz::byte));
always_assert(canEmit(sz::byte));
TRACE(10, "%p b : %02x\n", frontier, byte);
*frontier = byte;
frontier += sz::byte;
}
void word(const uint16_t word) {
assert(canEmit(sz::word));
always_assert(canEmit(sz::word));
*(uint16_t*)frontier = word;
TRACE(10, "%p w : %04x\n", frontier, word);
frontier += sz::word;
}
void dword(const uint32_t dword) {
assert(canEmit(sz::dword));
always_assert(canEmit(sz::dword));
TRACE(10, "%p d : %08x\n", frontier, dword);
*(uint32_t*)frontier = dword;
frontier += sz::dword;
}
void qword(const uint64_t qword) {
assert(canEmit(sz::qword));
always_assert(canEmit(sz::qword));
TRACE(10, "%p q : %016" PRIx64 "\n", frontier, qword);
*(uint64_t*)frontier = qword;
frontier += sz::qword;
}
void bytes(size_t n, const uint8_t *bs) {
assert(canEmit(n));
always_assert(canEmit(n));
TRACE(10, "%p [%ld b] : [%p]\n", frontier, n, bs);
if (n <= 8) {
// If it is a modest number of bytes, try executing in one machine