From a53ee330ce85ca00ae429a27fa1b87ccbbbd33e4 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Wed, 6 Aug 2014 11:41:37 -0700 Subject: [PATCH] Marking branches/calls as volatile. --- .../compiler/passes/register_allocation_pass.cc | 1 + src/alloy/hir/opcodes.inl | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/alloy/compiler/passes/register_allocation_pass.cc b/src/alloy/compiler/passes/register_allocation_pass.cc index 1481e80d4..171610744 100644 --- a/src/alloy/compiler/passes/register_allocation_pass.cc +++ b/src/alloy/compiler/passes/register_allocation_pass.cc @@ -321,6 +321,7 @@ bool RegisterAllocationPass::TryAllocateRegister(Value* value) { } bool RegisterAllocationPass::SpillOneRegister(HIRBuilder* builder, + Block* block, TypeName required_type) { // Get the set that we will be picking from. RegisterSetUsage* usage_set; diff --git a/src/alloy/hir/opcodes.inl b/src/alloy/hir/opcodes.inl index 14c1dbf8b..a5c22c89b 100644 --- a/src/alloy/hir/opcodes.inl +++ b/src/alloy/hir/opcodes.inl @@ -54,43 +54,43 @@ DEFINE_OPCODE( OPCODE_CALL, "call", OPCODE_SIG_X_S, - OPCODE_FLAG_BRANCH) + OPCODE_FLAG_BRANCH | OPCODE_FLAG_VOLATILE) DEFINE_OPCODE( OPCODE_CALL_TRUE, "call_true", OPCODE_SIG_X_V_S, - OPCODE_FLAG_BRANCH) + OPCODE_FLAG_BRANCH | OPCODE_FLAG_VOLATILE) DEFINE_OPCODE( OPCODE_CALL_INDIRECT, "call_indirect", OPCODE_SIG_X_V, - OPCODE_FLAG_BRANCH) + OPCODE_FLAG_BRANCH | OPCODE_FLAG_VOLATILE) DEFINE_OPCODE( OPCODE_CALL_INDIRECT_TRUE, "call_indirect_true", OPCODE_SIG_X_V_V, - OPCODE_FLAG_BRANCH) + OPCODE_FLAG_BRANCH | OPCODE_FLAG_VOLATILE) DEFINE_OPCODE( OPCODE_CALL_EXTERN, "call_extern", OPCODE_SIG_X_S, - OPCODE_FLAG_BRANCH) + OPCODE_FLAG_BRANCH | OPCODE_FLAG_VOLATILE) DEFINE_OPCODE( OPCODE_RETURN, "return", OPCODE_SIG_X, - OPCODE_FLAG_BRANCH) + OPCODE_FLAG_BRANCH | OPCODE_FLAG_VOLATILE) DEFINE_OPCODE( OPCODE_RETURN_TRUE, "return_true", OPCODE_SIG_X_V, - OPCODE_FLAG_BRANCH) + OPCODE_FLAG_BRANCH | OPCODE_FLAG_VOLATILE) DEFINE_OPCODE( OPCODE_SET_RETURN_ADDRESS,