From 65fcc2cf3c5cd97b84330c094908f3a6a7a8d4e7 Mon Sep 17 00:00:00 2001 From: Dave Allison Date: Mon, 28 Apr 2014 13:45:27 -0700 Subject: Thumb2 assembler for JNI compiler and optimizing compiler This provides a programmatic assembler for the thumb2 instruction set for ARM. The interface is the same as the ARM assembler and the ARM assembler has been moved into Arm32Assembler. The assembler handles most 16 and 32 bit instructions and also allows relocations due to branch expansion. It will also rewrite cbz/cbnz instructions if they go out of range. It also changes the JNI compiler to use the thumb2 assembler as opposed to forcing it to use ARM32. The trampoline compiler still uses ARM due to the way it returns the address of its generated code. A trampoline in thumb2 is the same size as that in ARM anyway (8 bytes). Provides gtest for testing the thumb2 instruction output. This gtest only runs on the host as it uses arm-eabi-objdump to disassemble the generated code. On the target the output is not checked but the assembler will still be run to perform all its checks. Change-Id: Icd9742b6f13541bec5b23097896727392e3a6fb6 --- compiler/optimizing/code_generator_arm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/code_generator_arm.h') diff --git a/compiler/optimizing/code_generator_arm.h b/compiler/optimizing/code_generator_arm.h index 423b13e..c945a06 100644 --- a/compiler/optimizing/code_generator_arm.h +++ b/compiler/optimizing/code_generator_arm.h @@ -19,7 +19,7 @@ #include "code_generator.h" #include "nodes.h" -#include "utils/arm/assembler_arm.h" +#include "utils/arm/assembler_arm32.h" namespace art { namespace arm { @@ -152,7 +152,7 @@ class CodeGeneratorARM : public CodeGenerator { LocationsBuilderARM location_builder_; InstructionCodeGeneratorARM instruction_visitor_; - ArmAssembler assembler_; + Arm32Assembler assembler_; DISALLOW_COPY_AND_ASSIGN(CodeGeneratorARM); }; -- cgit v1.1