2015-07-25 06:39:38 -04:00
|
|
|
# euclide's algorithm in ssa
|
|
|
|
# it is a fairly interesting
|
|
|
|
# ssa program because of the
|
|
|
|
# swap of b and a
|
|
|
|
|
|
|
|
@start
|
|
|
|
|
|
|
|
@loop
|
2015-08-01 18:17:06 -04:00
|
|
|
%a =w phi @start 380, @loop %r
|
|
|
|
%b =w phi @start 747, @loop %a
|
|
|
|
%r =w rem %b, %a
|
2015-07-25 06:39:38 -04:00
|
|
|
jez %r, @end, @loop
|
|
|
|
|
|
|
|
@end
|
|
|
|
ret
|