Download presentation

Presentation is loading. Please wait.

Published byDaniel Gatrell Modified about 1 year ago

1
CS410 Chapter 9 Assembly Code Generation

2
Slide 9-87: Accumulator Register 3 + 4 addi $t1, $zero, 3 addi $ACC, $t1, 4

3
Slide 9-90: Accumulator Register memory (FP – 12) lw $ACC, -12($FP)

4
Slide 9-100: Accumulator Register move [memory(FP), 4] addi $ACC, $zero, 4 sw $ACC, 0($FP)

5
Slide 9-108: Larger Tile Example move[memory(FP-4), 7] addi $ACC, $zero, 7 sw $ACC, -4($FP)

6
Slide 9-118: Larger Tile Example move[memory(r2-x), r1] addi $ACC, $zero, r1 sw $ACC, -x($r2)

7
Slide 9-131: Larger Tiles: conditional jump CondJump(“jumplab”) if (3 == 4); addi $ACC, $zero, 3 addi $t1, $zero, 4 beq $t1, $ACC, truelab1 addi $ACC, $zero, 0 jendlab1 truelab1: addi $ACC, $zero, 1 endlab1: bgtz $ACC, jumplab

8
Slide 9-146: Constant Stack Offsets Figure 9.2 (p241): x = 9-(8-(7-6)) addi $ACC, $zero, 9 addi $t1, $zero, 8 addi $t2, $zero, 7 addi $t3, $zero, 6 sub $t3, $t2, $t3 sub $t1, $t1, $t3 sub $ACC, $ACC, $t1

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google