Advertisement
asharma

minimum

Feb 26th, 2019
1,172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ecall   x3, x0, 5
  2. ecall   x4, x0, 5
  3. ecall   x5, x0, 5
  4.  
  5.  
  6. blt     x3, x4, a # a < b
  7. blt     x4, x5, b # b < c                   # branch to
  8. ecall   x5, x5, 0
  9. beq     x0, x0, exit    
  10.  
  11.  
  12.  
  13.  
  14. a:
  15.     blt x3, x5, print_a
  16.     ecall   x5, x5, 0
  17.     beq     x0, x0, exit    # if $t0 == $t1 then target
  18.  
  19. b:
  20.     ecall   x4, x4, 0
  21.     beq     x0, x0, exit
  22.  
  23. c:
  24.     ecall x5, x5, 0
  25.     beq   x0, x0, exit        
  26.  
  27. print_a:
  28.     ecall   x3, x3, 0
  29.     beq     x0, x0, exit
  30.  
  31.  
  32.  
  33.  
  34. exit:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement