Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 ECE 5465 Advanced Microcomputers Group 11: Brian Knight Benjamin Moore Alex Williams.

Similar presentations


Presentation on theme: "1 ECE 5465 Advanced Microcomputers Group 11: Brian Knight Benjamin Moore Alex Williams."— Presentation transcript:

1 1 ECE 5465 Advanced Microcomputers Group 11: Brian Knight Benjamin Moore Alex Williams

2 Outline  Review Basic Data Processing Instructions Arithmetic, Bit-wise, Movement, Comparison Instructions ADC, SBC, and RSB Operand2 Multiply Instructions Immediate Values  Binary Encoding 2

3 Review Data Processing Instructions  Arm data processing instructions - Perform arithmetic operations Perform logical operations Operate on data values in Registers  The only instructions that modify data values  Typically require two operands and produce single result 3

4 Arithmetic & Bit-wise Operations  op{cond}{S} Rd, Rn, Operand2, where op: ADD, SUB, RSB, ADC, SBC, RSC, AND, ORR, EOR, or BIC cond: optional condition code S: optional suffix that causes condition codes to be updated Rd: ARM register that stores the result Rn: ARM register holding first Operand Operand2: flexible second operand 4

5 Arithmetic & Bit-wise Operations 5

6 Purpose of ADC and SBC  ADC and SBC can be used to perform 64-bit operations  64-bit Add Example: 1 st number : r0,r1 2 nd number: r2,r3 6

7 Operand2  Operand2 is a flexible operand with two possible forms #immed_8r: Expression evaluating to numeric constant Rm{,shift}, where  Rm: ARM Register holding data for second operand  shift: Optional shift to be applied to Rm (LSL,LSR,ASL,ASR,ROR, or RRX)  Why do we need both SUB and RSB? RSBr4, r4, #1280; r4:= 1280 – r4 7

8 Outline  Review Basic Data Processing Instructions Arithmetic, Bit-wise, Movement, Comparison Instructions ADC, SBC, and RSB Operand2 Multiply Instructions Immediate Values  Binary Encoding 8

9 Register Movement Operations  op{cond}{S} Rd, Operand2 9

10 Comparison Operations  op{cond} Rn, Operand2 10

11 Multiplies  Immediate second operands not supported  Result register must be different than first source  Only the least significant 32 bits are saved 11

12 Multiply Long Opcode [23:21]MnemonicMeaningEffect 0MULMultiply(32-bit result)Rd:=(Rm*Rs)[31:0] 1MLAMultiply-accumulate(32-bit result)Rd:=(Rm*Rs+Rn)[31:0] 100UMULLUnsigned multiply longRdHi:RdLo:=Rm*Rs 101UMLALUnsigned multiply-accumulate longRdHi:RdLo+=Rm*Rs 110SMULLSigned multiply longRdHi:RdLo:=Rm*Rs 111SMLALSigned multiply-accumulate longRdHi:RdLo+=Rm*Rs 12  ‘RdHi:RdLo’ is the 64-bit result from long multiplication  Assignment is denoted with ‘:=‘, Accumulation is denoted by ‘+=‘

13 Outline  Review Basic Data Processing Instructions Arithmetic, Bit-wise, Movement, Comparison Instructions ADC, SBC, and RSB Operand2 Multiply Instructions Immediate Values  Binary Encoding 13

14 Immediate Values 14

15 Binary Encoding 15  For Data Processing Instructions  Condition Codes

16 Binary Encoding 16  For Data Processing Instructions  Opcode:

17 Binary Encoding  For Multiply Instructions 17

18 BACK-UP SLIDES 18

19 How long multiply works 19

20 Supported Immediate Values 00000000 00000000 00000000 XXXXXXXX 00000000 00000000 000000XX XXXXXX00 00000000 00000000 0000XXXX XXXX0000 …. XXXXXXXX 00000000 00000000 00000000 XXXXXX00 00000000 00000000 000000XX XXXX0000 00000000 00000000 0000XXXX XX000000 00000000 00000000 00XXXXXX 20

21 Supported Immediate Values  What if you want an immediate number of the form following form? 00000000 00000000 XX000000 XXXXXXXX  Note that this is just … 00000000 00000000 XX000000 00000000 + 00000000 00000000 00000000 XXXXXXXX 21


Download ppt "1 ECE 5465 Advanced Microcomputers Group 11: Brian Knight Benjamin Moore Alex Williams."

Similar presentations


Ads by Google