csci2021/ArchLab/archlab-handout/sim/y86-code/prog7.ys
Michael Zhang 1fa36db752
f
2018-01-29 17:45:27 -06:00

13 lines
267 B
Text

# Demonstrate branch cancellation
# /* $begin prog7-ys */
# prog7
xorq %rax,%rax
jne target # Not taken
irmovq $1, %rax # Fall through
halt
target:
irmovq $2, %rdx # Target
irmovq $3, %rbx # Target+1
# /* $end prog7-ys */
halt