Build Programming Language Runtime with LLVM
Build Programming Language Runtime with LLVM
Build Programming Language Runtime with LLVM
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
測 試 SDK 內 建 範 例 RenderScript<br />
androidsdklinux_x86/platformtools$ ./llvmrscc \<br />
../samples/android11/<br />
RenderScript/HelloWorld/src/com/android/rs/helloworld/helloworld.rs \<br />
I ../platforms/android11/renderscript/include \<br />
I ../platforms/android11/renderscript/clanginclude<br />
Llvmdis < helloworld.bc<br />
@gTouchX = common global i32 0, align 4<br />
@gTouchY = common global i32 0, align 4<br />
// helloworld.rs<br />
// This is invoked automatically<br />
// when the script is created<br />
void init() {<br />
gTouchX = 50.0f;<br />
gTouchY = 50.0f;<br />
}<br />
define void @init() nounwind {<br />
store i32 50, i32* @gTouchX, align 4<br />
store i32 50, i32* @gTouchY, align 4<br />
ret void<br />
}<br />
34