
Review-lLDTheAArch64SLAA64SLProgrammers'Model A64 SLMemoryModel?A64VMSAA64SystemRegisterExceptionentry?(PC+4→ELR,PSTATE→SPSR)Exceptionreturn?(ELRPC,SPSRPSTATE)ARM062019-3-21
Review – II D The AArch64 SLA A64 SL Programmers’ Model A64 SL Memory Model A64 VMSA A64 System Register ARM06 2019-3-21 1 Exception entry? (PC+4→ELR, PSTATE→SPSR) Exception return? (ELR→PC, SPSR→PSTATE)

ARMProgramming1AssemblyModule 2Procedure Call Standard3MixingProgramming 4 Toolchain Introduction5SummaryExercisesARM062019-3-21
ARM Programming ARM06 2019-3-21 2 1 Assembly Module 2 Procedure Call Standard 3 Mixing Programming 4 Toolchain Introduction 5 Summary Exercises

合1AssemblyModule 1.1 ARM Assembly Module 1.2 GNU Assembly ModulearmARMO62019-3-21
1 Assembly Module ARM06 2019-3-21 3 1.1 ARM Assembly Module 1.2 GNU Assembly Module

arm1.1ARMAssemblyModule 1.1.1 Assembly line 1.1.2 Assembly moduleARM062019-3-21
1.1 ARM Assembly Module ARM06 2019-3-21 4 1.1.1 Assembly line 1.1.2 Assembly module

1.1.1 Assembly lineARM062019-3-21
1.1.1 Assembly line ARM06 2019-3-21 5

[symbol)[instruction|pseudo|directive](;comment)All threesectionsof the sourceline areoptional lnstructionmnemonics,pseudo-instructions,directives,andsymbolicregister names can be written in all uppercase or all lowercase,butnot mixedLabels and comments can be in uppercase or lowercase, or mixedARMO62019-3-21
{symbol} {instruction|pseudo|directive} {;comment} ARM06 2019-3-21 6 All three sections of the source line are optional Instruction mnemonics, pseudo-instructions, directives, and symbolic register names can be written in all uppercase or all lowercase, but not mixed Labels and comments can be in uppercase or lowercase, or mixed

[symbol)[instruction|pseudo|directive](;comment)symbolis usually alabel州 symbol must begin in the first columnARMO62019-3-21
{symbol} {instruction|pseudo|directive} {;comment} ARM06 2019-3-21 7 symbol is usually a label symbol must begin in the first column

[symbol)[instruction|pseudo|directive](;comment) Instructions,pseudo-instructions, and directives must be preceded bywhitespace,such as a space or atab,irrespectiveof whetherthereisaprecedinglabel ornotARMO62019-3-21
{symbol} {instruction|pseudo|directive} {;comment} ARM06 2019-3-21 8 Instructions, pseudo-instructions, and directives must be preceded by white space, such as a space or a tab, irrespective of whether there is a preceding label or not

[symbol)[instruction|pseudo|directive](;comment?Comment is the final part of a source line The first semicolon on a line marks the beginning of a comment exceptwherethe semicolon appearsinside a string literalARMO62019-3-21
{symbol} {instruction|pseudo|directive} {;comment} ARM06 2019-3-21 9 Comment is the final part of a source line The first semicolon on a line marks the beginning of a comment except where the semicolon appears inside a string literal

Example-1/210AREAA64eX,CODE,READONLY:Namethisblockof codeA64exsymbolENTRY:Mark first instruction to executeinstructioncommentstartMOVwo,#10Set up parametersMOVw1, #3ADDwo, wo, w1;wO=wO+WIstopMOVx1,#0x26MOVKx1,#2,LSL#16STRx1,[sp,#0]ADP_Stopped_ApplicationExitMOVx0,#0STRx0,[sp,#8]Exit status codeMOVx1,spxl contains the address of parameter blockMOVwo,#0x18ange1_SwIreason_ReportExceptionHLT0xf000AArch64semihostingEND;Mark endoffileARM062019-3-21
Example - 1/2 ARM06 2019-3-21 10 symbol instruction comment