tests: correct builtins test if built under -mthumb on ARM
authorSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 5 Jan 2015 21:54:50 +0000 (21:54 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 5 Jan 2015 21:54:50 +0000 (21:54 +0000)
commit6e6c1c3ef2dcf80a57c9853f74cb859c2419710f
treeeaec97a46f56fb25d82bd4e8745d42e147064e59
parent9187711f0844bf229012e46c5abe71647f318455
tests: correct builtins test if built under -mthumb on ARM

The clear_cache and enable_execute_stack tests attempt to memcpy the definition
of a function into a buffer before executing the function.  The problem with
this approach is that on some targets (ARM with thumb mode compilation, MIPS
with MIPS16 codegen or uMIPS), you would use a pointer which is incorrect (it
would be off-by-one) due to the ISA selection being encoded into the address.
This ensures that the function address is retrieved correctly in all cases.

llvm-svn: 225215
compiler-rt/test/builtins/Unit/clear_cache_test.c
compiler-rt/test/builtins/Unit/enable_execute_stack_test.c