File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 137137(instruct Jle (x) check:target)
138138(instruct Jg (x) check:target)
139139(instruct Jge (x) check:target)
140+ (instruct Jo (x) check:target)
141+ (instruct Jno (x) check:target)
142+ (instruct Jc (x) check:target)
143+ (instruct Jnc (x) check:target)
140144(instruct And (dst src) check:src-dest)
141145(instruct Or (dst src) check:src-dest)
142146(instruct Xor (dst src) check:src-dest)
201205 (Jle? x)
202206 (Jg? x)
203207 (Jge? x)
208+ (Jo? x)
209+ (Jno? x)
210+ (Jc? x)
211+ (Jnc? x)
204212 (And? x)
205213 (Or? x)
206214 (Xor? x)
Original file line number Diff line number Diff line change 141141 [(Jge l)
142142 (string-append tab "jge "
143143 (jump-target->string l))]
144+ [(Jo l)
145+ (string-append tab "jo "
146+ (jump-target->string l))]
147+ [(Jno l)
148+ (string-append tab "jno "
149+ (jump-target->string l))]
150+ [(Jc l)
151+ (string-append tab "jc "
152+ (jump-target->string l))]
153+ [(Jnc l)
154+ (string-append tab "jnc "
155+ (jump-target->string l))]
144156 [(Call l)
145157 (string-append tab "call "
146158 (jump-target->string l))]
Original file line number Diff line number Diff line change @@ -1028,6 +1028,75 @@ Each register plays the same role as in x86, so for example
10281028 ]
10291029}
10301030
1031+ @defstruct*[Jo ([x (or/c label? register?)])]{
1032+ Jump to @racket[x] if the overflow flag is set.
1033+
1034+ @ex[
1035+ (asm-interp
1036+ (prog
1037+ (Global 'entry )
1038+ (Label 'entry )
1039+ (Mov 'rax (sub1 (expt 2 63 )))
1040+ (Add 'rax 1 )
1041+ (Jo 'l1 )
1042+ (Mov 'rax 0 )
1043+ (Label 'l1 )
1044+ (Ret)))
1045+ ]
1046+ }
1047+
1048+ @defstruct*[Jno ([x (or/c label? register?)])]{
1049+ Jump to @racket[x] if the overflow flag is @emph{not} set.
1050+
1051+ @ex[
1052+ (asm-interp
1053+ (prog
1054+ (Global 'entry )
1055+ (Label 'entry )
1056+ (Mov 'rax (sub1 (expt 2 63 )))
1057+ (Add 'rax 1 )
1058+ (Jno 'l1 )
1059+ (Mov 'rax 0 )
1060+ (Label 'l1 )
1061+ (Ret)))
1062+ ]
1063+ }
1064+
1065+ @defstruct*[Jc ([x (or/c label? register?)])]{
1066+ Jump to @racket[x] if the carry flag is set.
1067+
1068+ @ex[
1069+ (asm-interp
1070+ (prog
1071+ (Global 'entry )
1072+ (Label 'entry )
1073+ (Mov 'rax -1 )
1074+ (Add 'rax 1 )
1075+ (Jc 'l1 )
1076+ (Mov 'rax 0 )
1077+ (Label 'l1 )
1078+ (Ret)))
1079+ ]
1080+ }
1081+
1082+ @defstruct*[Jnc ([x (or/c label? register?)])]{
1083+ Jump to @racket[x] if the carry flag is @emph{not} set.
1084+
1085+ @ex[
1086+ (asm-interp
1087+ (prog
1088+ (Global 'entry )
1089+ (Label 'entry )
1090+ (Mov 'rax -1 )
1091+ (Add 'rax 1 )
1092+ (Jnc 'l1 )
1093+ (Mov 'rax 0 )
1094+ (Label 'l1 )
1095+ (Ret)))
1096+ ]
1097+ }
1098+
1099+
10311100@defstruct*[And ([dst (or/c register? offset?)] [src (or/c register? offset? exact-integer?)])]{
10321101 Compute logical ``and '' of @racket[dst] and @racket[src] and put result in @racket[dst].
10331102
You can’t perform that action at this time.
0 commit comments