1 / 3

Compiler

Compiler. RealView Development Suite 4.0 Supported ARM architecture - ARMv4 – ARMv7. Sample Code. factorial.s ; generated by ARM C/C++ Compiler, RVCT4.0 [Build 400] ; commandline armcc [--c99 -c -- asm - ofactorial.o -- cpu =4T .. factorial.c ] main PROC MOV r0,#0

cortez
Download Presentation

Compiler

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Compiler • RealView Development Suite 4.0 • Supported ARM architecture - ARMv4 – ARMv7

  2. Sample Code factorial.s ; generated by ARM C/C++ Compiler, RVCT4.0 [Build 400] ; commandlinearmcc [--c99 -c --asm -ofactorial.o --cpu=4T ..\factorial.c] main PROC MOV r0,#0 |L1.4| ADD r0,r0,#1 CMP r0,#4 BLT |L1.4| MOV r0,#0 |L1.20| ADD r0,r0,#1 CMP r0,#3 BLT |L1.20| MOV r0,#0 |L1.36| ADD r0,r0,#1 CMP r0,#2 BLT |L1.36| MOV r0,#0 |L1.52| ADD r0,r0,#1 CMP r0,#1 BLT |L1.52| MOV r0,#0 BX lr ENDP factorial.c int main(){ inti, x; intans; for (x = 0, i=0; i<4; i++){ x = x + 5; } ans = x; for (x = 0, i=0; i<3; i++){ x = x + ans; } ans = x; for (x = 0, i=0; i<2; i++){ x = x + ans; } ans = x; for (x = 0, i=0; i<1; i++){ x = x + ans; } ans = x; return 0; } Default ARM architecture: ARM7TDMI

  3. Problems Encountered • Acquiring a full version of the tool • Compiling the test program (radix.c)

More Related