mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
snapshot
This commit is contained in:
parent
325f93b4d1
commit
6cef085d7e
@ -115,6 +115,11 @@ enum OperandType {
|
||||
MemoryOperand
|
||||
};
|
||||
|
||||
enum ValueType {
|
||||
ValueGeneral,
|
||||
ValueFloat
|
||||
};
|
||||
|
||||
const unsigned OperandTypeCount = MemoryOperand + 1;
|
||||
|
||||
const int NoRegister = -1;
|
||||
@ -292,12 +297,10 @@ class Assembler {
|
||||
|
||||
class Architecture {
|
||||
public:
|
||||
virtual unsigned registerCount() = 0;
|
||||
virtual unsigned generalRegisterCount() = 0;
|
||||
virtual unsigned floatRegisterCount() = 0;
|
||||
virtual uint64_t generalRegisters() = 0;
|
||||
virtual uint64_t floatRegisters() = 0;
|
||||
virtual uint64_t allRegisters() = 0;
|
||||
virtual unsigned floatRegisterSize() = 0;
|
||||
|
||||
virtual uint32_t generalRegisterMask() = 0;
|
||||
virtual uint32_t floatRegisterMask() = 0;
|
||||
|
||||
virtual int stack() = 0;
|
||||
virtual int thread() = 0;
|
||||
@ -307,6 +310,8 @@ class Assembler {
|
||||
virtual int virtualCallIndex() = 0;
|
||||
|
||||
virtual bool bigEndian() = 0;
|
||||
|
||||
virtual unsigned registerSize(ValueType type) = 0;
|
||||
|
||||
virtual bool supportsFloatCompare(unsigned size) = 0;
|
||||
|
||||
|
@ -34,7 +34,7 @@ namespace {
|
||||
|
||||
namespace local {
|
||||
|
||||
const bool DebugCompile = false;
|
||||
const bool DebugCompile = true;
|
||||
const bool DebugNatives = false;
|
||||
const bool DebugCallTable = false;
|
||||
const bool DebugMethodTree = false;
|
||||
@ -5353,19 +5353,17 @@ finish(MyThread* t, Allocator* allocator, Context* context)
|
||||
(&byteArrayBody(t, methodSpec(t, context->method), 0)));
|
||||
|
||||
// for debugging:
|
||||
if (false and
|
||||
if (//false and
|
||||
::strcmp
|
||||
(reinterpret_cast<const char*>
|
||||
(&byteArrayBody(t, className(t, methodClass(t, context->method)), 0)),
|
||||
"java/lang/Throwable") == 0 and
|
||||
"AllFloats") == 0 and
|
||||
::strcmp
|
||||
(reinterpret_cast<const char*>
|
||||
(&byteArrayBody(t, methodName(t, context->method), 0)),
|
||||
"write") == 0)
|
||||
"multiplyByFive") == 0)
|
||||
{
|
||||
trap();
|
||||
fprintf(stderr, "Address: %p\n",
|
||||
::vmAddressFromLine(t, (object)(context->method), 1176));
|
||||
}
|
||||
|
||||
syncInstructionCache(start, codeSize);
|
||||
|
603
src/compiler.cpp
603
src/compiler.cpp
File diff suppressed because it is too large
Load Diff
45
src/x86.cpp
45
src/x86.cpp
@ -2505,38 +2505,21 @@ class MyArchitecture: public Assembler::Architecture {
|
||||
populateTables(&c);
|
||||
}
|
||||
|
||||
virtual unsigned registerCount() {
|
||||
virtual unsigned floatRegisterSize() {
|
||||
if (supportsSSE()) {
|
||||
return BytesPerWord == 4 ? 24 : 32;
|
||||
} else {
|
||||
return BytesPerWord == 4 ? 8 : 16;
|
||||
}
|
||||
}
|
||||
|
||||
virtual unsigned generalRegisterCount() {
|
||||
return BytesPerWord == 4 ? 8 : 16;
|
||||
}
|
||||
|
||||
virtual unsigned floatRegisterCount() {
|
||||
if (supportsSSE()) {
|
||||
return BytesPerWord == 4 ? 8 : 16;
|
||||
return 8;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
virtual uint64_t generalRegisters() {
|
||||
return GeneralRegisterMask;
|
||||
virtual uint32_t generalRegisterMask() {
|
||||
return GeneralRegisterMask;
|
||||
}
|
||||
|
||||
virtual uint64_t floatRegisters() {
|
||||
return supportsSSE() ? FloatRegisterMask : 0;
|
||||
virtual uint32_t floatRegisterMask() {
|
||||
return supportsSSE() ? FloatRegisterMask : 0;
|
||||
}
|
||||
|
||||
virtual uint64_t allRegisters() {
|
||||
return generalRegisters() | floatRegisters();
|
||||
}
|
||||
|
||||
|
||||
virtual int stack() {
|
||||
return rsp;
|
||||
@ -2566,6 +2549,14 @@ class MyArchitecture: public Assembler::Architecture {
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual unsigned registerSize(ValueType type) {
|
||||
switch (type) {
|
||||
case ValueGeneral: return BytesPerWord;
|
||||
case ValueFloat: return 8;
|
||||
default: abort(&c);
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool reserved(int register_) {
|
||||
switch (register_) {
|
||||
case rbp:
|
||||
@ -2993,8 +2984,12 @@ class MyArchitecture: public Assembler::Architecture {
|
||||
if (supportsSSE()) {
|
||||
*aTypeMask = (1 << RegisterOperand) | (1 << MemoryOperand);
|
||||
*bTypeMask = (1 << RegisterOperand);
|
||||
*aRegisterMask = FloatRegisterMask;
|
||||
*bRegisterMask = FloatRegisterMask;
|
||||
|
||||
const uint64_t mask
|
||||
= (static_cast<uint64_t>(FloatRegisterMask) << 32)
|
||||
| FloatRegisterMask;
|
||||
*aRegisterMask = mask;
|
||||
*bRegisterMask = mask;
|
||||
} else {
|
||||
*thunk = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user