Skip to content

Commit 2f0f358

Browse files
committed
[cpu] Add warning comment about SKX with config value 0o30.
1 parent a6699c2 commit 2f0f358

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

cpu/src/control/op_index.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,18 @@ impl ControlUnit {
146146
// placeholder for use with TRAP 42.
147147
let operand = inst.operand_address_and_defer_bit();
148148
let config = u8::from(inst.configuration());
149+
// NOTE: when we come to implement other configuration values,
150+
// we may need to pay closer attention to the ordering of flag
151+
// changes, since the TX-2 performed flag lowering and raising
152+
// in that order. For example (text is from section 7-8.3 of
153+
// the TX-2 Technical Manual, Volume 1),
154+
//
155+
// if the CF4 bit is set in an SKX instruction, the flag of
156+
// sequence J is raised (if such a flag exists). Since flag
157+
// raising occurs after a flag lowering caused by a dismiss,
158+
// an SKX operaiton which dismisses and raises the flag of its
159+
// own sequence will have no apparent effect on the flag.
160+
//
149161
match config {
150162
0o0 | 0o10 => {
151163
if j != 0 {
@@ -158,6 +170,10 @@ impl ControlUnit {
158170
}
159171
Ok(OpcodeResult::default())
160172
}
173+
// See comment above for config value 0o30 where the J
174+
// bits indicate the current sequence (which the case
175+
// where this instruction both lowers and raises the same
176+
// flag in the same instruction).
161177
0o1 => {
162178
if j != 0 {
163179
// Xj is fixed at 0.

0 commit comments

Comments
 (0)