fix debug build

This commit is contained in:
Joshua Warner 2013-02-24 16:03:19 -07:00
parent 4c8b593539
commit d2caf50772
7 changed files with 48 additions and 23 deletions

View File

@ -16,6 +16,8 @@ namespace avian {
namespace codegen { namespace codegen {
namespace arm { namespace arm {
using namespace util;
unsigned padding(MyBlock*, unsigned); unsigned padding(MyBlock*, unsigned);
OffsetPromise::OffsetPromise(Context* con, MyBlock* block, unsigned offset, bool forTrace): OffsetPromise::OffsetPromise(Context* con, MyBlock* block, unsigned offset, bool forTrace):

View File

@ -16,6 +16,8 @@ namespace avian {
namespace codegen { namespace codegen {
namespace arm { namespace arm {
using namespace util;
unsigned index(ArchitectureContext*, lir::UnaryOperation operation, lir::OperandType operand) unsigned index(ArchitectureContext*, lir::UnaryOperation operation, lir::OperandType operand)
{ {
return operation + (lir::UnaryOperationCount * operand); return operation + (lir::UnaryOperationCount * operand);

View File

@ -18,6 +18,7 @@ namespace codegen {
namespace powerpc { namespace powerpc {
using namespace isa; using namespace isa;
using namespace util;
unsigned padding(MyBlock*, unsigned); unsigned padding(MyBlock*, unsigned);

View File

@ -19,6 +19,38 @@ namespace avian {
namespace codegen { namespace codegen {
namespace powerpc { namespace powerpc {
using namespace util;
unsigned index(ArchitectureContext*, lir::UnaryOperation operation, lir::OperandType operand)
{
return operation + (lir::UnaryOperationCount * operand);
}
unsigned index(ArchitectureContext*,
lir::BinaryOperation operation,
lir::OperandType operand1,
lir::OperandType operand2)
{
return operation
+ (lir::BinaryOperationCount * operand1)
+ (lir::BinaryOperationCount * lir::OperandTypeCount * operand2);
}
unsigned index(ArchitectureContext* c UNUSED,
lir::TernaryOperation operation,
lir::OperandType operand1)
{
assert(c, not isBranch(operation));
return operation + (lir::NonBranchTernaryOperationCount * operand1);
}
unsigned branchIndex(ArchitectureContext* c UNUSED, lir::OperandType operand1,
lir::OperandType operand2)
{
return operand1 + (lir::OperandTypeCount * operand2);
}
void populateTables(ArchitectureContext* c) { void populateTables(ArchitectureContext* c) {
const lir::OperandType C = lir::ConstantOperand; const lir::OperandType C = lir::ConstantOperand;
const lir::OperandType A = lir::AddressOperand; const lir::OperandType A = lir::AddressOperand;

View File

@ -21,35 +21,19 @@ namespace codegen {
namespace powerpc { namespace powerpc {
inline unsigned index(ArchitectureContext*, lir::UnaryOperation operation, lir::OperandType operand) unsigned index(ArchitectureContext*, lir::UnaryOperation operation, lir::OperandType operand);
{
return operation + (lir::UnaryOperationCount * operand);
}
inline unsigned index(ArchitectureContext*, unsigned index(ArchitectureContext*,
lir::BinaryOperation operation, lir::BinaryOperation operation,
lir::OperandType operand1, lir::OperandType operand1,
lir::OperandType operand2) lir::OperandType operand2);
{
return operation
+ (lir::BinaryOperationCount * operand1)
+ (lir::BinaryOperationCount * lir::OperandTypeCount * operand2);
}
inline unsigned index(ArchitectureContext* c UNUSED, unsigned index(ArchitectureContext* c UNUSED,
lir::TernaryOperation operation, lir::TernaryOperation operation,
lir::OperandType operand1) lir::OperandType operand1);
{
assert(c, not isBranch(operation));
return operation + (lir::NonBranchTernaryOperationCount * operand1); unsigned branchIndex(ArchitectureContext* c UNUSED, lir::OperandType operand1,
} lir::OperandType operand2);
inline unsigned branchIndex(ArchitectureContext* c UNUSED, lir::OperandType operand1,
lir::OperandType operand2)
{
return operand1 + (lir::OperandTypeCount * operand2);
}
void populateTables(ArchitectureContext* c); void populateTables(ArchitectureContext* c);

View File

@ -27,6 +27,8 @@ namespace avian {
namespace codegen { namespace codegen {
namespace x86 { namespace x86 {
using namespace util;
ResolvedPromise* resolvedPromise(Context* c, int64_t value) { ResolvedPromise* resolvedPromise(Context* c, int64_t value) {
return new(c->zone) ResolvedPromise(value); return new(c->zone) ResolvedPromise(value);
} }

View File

@ -22,6 +22,8 @@ namespace avian {
namespace codegen { namespace codegen {
namespace x86 { namespace x86 {
using namespace util;
unsigned index(ArchitectureContext*, lir::UnaryOperation operation, lir::OperandType operand) { unsigned index(ArchitectureContext*, lir::UnaryOperation operation, lir::OperandType operand) {
return operation + (lir::UnaryOperationCount * operand); return operation + (lir::UnaryOperationCount * operand);