From 04a3e53e50ae24a5ec88dc19278812e19f1c6257 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Wed, 6 Aug 2014 17:05:15 -0700 Subject: [PATCH] Fixing IVM. --- src/alloy/backend/ivm/ivm_intcode.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/alloy/backend/ivm/ivm_intcode.cc b/src/alloy/backend/ivm/ivm_intcode.cc index 741b167ae..f82ae39e7 100644 --- a/src/alloy/backend/ivm/ivm_intcode.cc +++ b/src/alloy/backend/ivm/ivm_intcode.cc @@ -101,7 +101,7 @@ uint32_t AllocConstant(TranslationContext& ctx, Value* value) { uint32_t AllocLabel(TranslationContext& ctx, Label* label) { // If it's a back-branch to an already tagged label avoid setting up // a reference. - uint32_t value = *reinterpret_cast(label->tag); + uint32_t value = reinterpret_cast(label->tag); if (value & 0x80000000) { // Already set. return AllocConstant(ctx, value & ~0x80000000); @@ -124,7 +124,7 @@ uint32_t AllocLabel(TranslationContext& ctx, Label* label) { uint32_t AllocDynamicRegister(TranslationContext& ctx, Value* value) { if (value->flags & VALUE_IS_ALLOCATED) { - return *reinterpret_cast(value->tag); + return reinterpret_cast(value->tag); } else { value->flags |= VALUE_IS_ALLOCATED; auto reg = ctx.register_count++;