| OLD | NEW |
| 1 //===- subzero/src/IceTargetLoweringARM32.cpp - ARM32 lowering ------------===// | 1 //===- subzero/src/IceTargetLoweringARM32.cpp - ARM32 lowering ------------===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // This file implements the TargetLoweringARM32 class, which consists almost | 10 // This file implements the TargetLoweringARM32 class, which consists almost |
| (...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2218 } break; | 2218 } break; |
| 2219 } | 2219 } |
| 2220 } | 2220 } |
| 2221 | 2221 |
| 2222 void TargetDataARM32::lowerConstants() const { | 2222 void TargetDataARM32::lowerConstants() const { |
| 2223 if (Ctx->getFlags().getDisableTranslation()) | 2223 if (Ctx->getFlags().getDisableTranslation()) |
| 2224 return; | 2224 return; |
| 2225 UnimplementedError(Ctx->getFlags()); | 2225 UnimplementedError(Ctx->getFlags()); |
| 2226 } | 2226 } |
| 2227 | 2227 |
| 2228 TargetHeaderARM32::TargetHeaderARM32(GlobalContext *Ctx) |
| 2229 : TargetHeaderLowering(Ctx) {} |
| 2230 |
| 2231 void TargetHeaderARM32::lower() { |
| 2232 OstreamLocker L(Ctx); |
| 2233 Ostream &Str = Ctx->getStrEmit(); |
| 2234 Str << ".syntax unified\n"; |
| 2235 // Emit build attributes in format: .eabi_attribute TAG, VALUE. |
| 2236 // See Sec. 2 of "Addenda to, and Errata in the ABI for the ARM architecture" |
| 2237 // http://infocenter.arm.com/help/topic/com.arm.doc.ihi0045d/IHI0045D_ABI_adde
nda.pdf |
| 2238 // |
| 2239 // Tag_conformance should be be emitted first in a file-scope |
| 2240 // sub-subsection of the first public subsection of the attributes. |
| 2241 Str << ".eabi_attribute 67, \"2.09\" @ Tag_conformance\n"; |
| 2242 // Chromebooks are at least A15, but do A9 for higher compat. |
| 2243 Str << ".cpu cortex-a9\n" |
| 2244 << ".eabi_attribute 6, 10 @ Tag_CPU_arch: ARMv7\n" |
| 2245 << ".eabi_attribute 7, 65 @ Tag_CPU_arch_profile: App profile\n"; |
| 2246 Str << ".eabi_attribute 8, 1 @ Tag_ARM_ISA_use: Yes\n" |
| 2247 << ".eabi_attribute 9, 2 @ Tag_THUMB_ISA_use: Thumb-2\n"; |
| 2248 // TODO(jvoung): check other CPU features like HW div. |
| 2249 Str << ".fpu neon\n" |
| 2250 << ".eabi_attribute 17, 1 @ Tag_ABI_PCS_GOT_use: permit directly\n" |
| 2251 << ".eabi_attribute 20, 1 @ Tag_ABI_FP_denormal\n" |
| 2252 << ".eabi_attribute 21, 1 @ Tag_ABI_FP_exceptions\n" |
| 2253 << ".eabi_attribute 23, 3 @ Tag_ABI_FP_number_model: IEEE 754\n" |
| 2254 << ".eabi_attribute 34, 1 @ Tag_CPU_unaligned_access\n" |
| 2255 << ".eabi_attribute 24, 1 @ Tag_ABI_align_needed: 8-byte\n" |
| 2256 << ".eabi_attribute 25, 1 @ Tag_ABI_align_preserved: 8-byte\n" |
| 2257 << ".eabi_attribute 28, 1 @ Tag_ABI_VFP_args\n" |
| 2258 << ".eabi_attribute 36, 1 @ Tag_FP_HP_extension\n" |
| 2259 << ".eabi_attribute 38, 1 @ Tag_ABI_FP_16bit_format\n" |
| 2260 << ".eabi_attribute 42, 1 @ Tag_MPextension_use\n" |
| 2261 << ".eabi_attribute 68, 1 @ Tag_Virtualization_use\n"; |
| 2262 // Technically R9 is used for TLS with Sandboxing, and we reserve it. |
| 2263 // However, for compatibility with current NaCl LLVM, don't claim that. |
| 2264 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; |
| 2265 } |
| 2266 |
| 2228 } // end of namespace Ice | 2267 } // end of namespace Ice |
| OLD | NEW |