1 / 8

CS410 Chapter 9 Assembly Code Generation

CS410 Chapter 9 Assembly Code Generation. Slide 9-87: Accumulator Register. 3 + 4 addi $t1, $zero, 3 addi $ACC, $t1, 4. Slide 9-90: Accumulator Register. memory (FP – 12) lw $ACC, -12($FP). Slide 9-100: Accumulator Register. move [memory(FP), 4] addi $ACC, $zero, 4

daw
Download Presentation

CS410 Chapter 9 Assembly Code Generation

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. 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 j endlab1 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

More Related