cpu: ext_reg switch bug FIX by markus
[calu.git] / 2_isa / misc.ptex
index 775d8fb6e080bc1e01eecb69a282a5d61d062d45..c25791e7adfbaa048b32d4693408251b20561199 100644 (file)
@@ -1,34 +1,28 @@
-ins ('32', 'branch', 'Branch; jump to pc+imm', '4 | 5 | 16 | 3 | 2 | 1 | 1', 'Conditions | OpCode | Immediate | - | Type | +/- | S',
-'This instruction should be used with it\'s aliases branch, call, ret and reti. No flags will be affected by this instructions.
-\\begin{table}[!h]
-\\centering
-\\begin{tabular}{|c|c|} \\hline
-\\textbf{Type}   & \\textbf{Bits} \\\\ \hline
- branch & 00   \\\\ \hline
- call   & 01   \\\\ \hline
- ret    & 10   \\\\ \hline
- reti   & 11   \\\\ \hline
-\\end{tabular}
-\\end{table}');
+ins ('32', 'jumpop', 'Branch/ret operation', '4 | 5 | 16 | 3 | 2 | 1 | 1',
+'Conditions | OpCode (10110) | Immediate | - | Type | +/- | S',
+'This instruction should be used with it\'s aliases br, call, ret and reti. No flags will be affected by this instructions.','','',
+'br-Branch relative-4/00|call-Branch relative and save pc to stack-4/01|ret-Return to adress on stack-4/10|reti-Return from interrupt to adress on stack-4/11');
 
-ins ('32', 'branchreg', 'Branch; jump to value of reg', '4 | 5 | 4 | 16 | 1 | 1 | 1', 'Conditions | OpCode | Register A | - | Type | +/- | -',
-'This instruction should be used with it\'s aliases branchr and callr. No flags will be affected by this instructions. If Type is set to 1, the current value of the programcounter is pushed onto the stack.');
+ins ('32', 'branchreg', 'Branch; jump to value of reg', '4 | 5 | 4 | 16 | 1 | 2 ',
+'Conditions | OpCode (10111) | Register A | - | Type | -',
+'This instruction should be used with its aliases \texttt{brr} and \texttt{callr}. No flags will be affected by this instructions. If Type is set to 1, the current value of the programcounter is pushed onto the stack.'
+,'','',
+'brr-Branch to value of reg-4/0|callr-Branch to value of reg and save PC to stack-4/1');
 
 #ins ('32', 'call', 'Call; save pc+4 in stack, jump to pc+imm', '4 | 5 | 16 | 5 | 1 | 1', 'Conditions | OpCode | Immediate | - | +/- | S');
 
-#ins ('32', 'branchreg', 'Branch; branch to value of reg', '4 | 5 | 4 | 17 | 1 | 1', 'Conditions | OpCode | Register Source| - | +/- | S');
-
 #ins ('32', 'ret(i)', 'return (from interrupt)', '4 | 5 | 1 | 22 ', 'Conditions | OpCode | I |-');
 
 #ins ('32', 'ret', 'ret', '4 | 5 | 23 ', 'Conditions | OpCode | -');
 
 #ins ('32', 'reti', 'reti', '4 | 5 | 23 ', 'Conditions | OpCode | -');
 
-ins ('32', 'cmp', 'compare (rS1 - rS2)', '4 | 5 | 4 | 4 | 15', 'Conditions | OpCode | Register A (Source1) | Register B (Source2) | -',
+ins ('32', 'cmp', 'compare (rS1 - rS2)', '4 | 5 | 4 | 4 | 15',
+'Conditions | OpCode (11000) | Register A (Source1) | Register B (Source2) | -',
 'This instructions compares the two source registers by subtraction of register B from register A and setting the flags accordingly',
 'is set to the MSB of the result|is set if the subtraction has a carry out|is set if an overflow occurred|is set if the result is zero');
 
-ins ('32', 'cmpi', 'compare (rS1 - imm)', '4 | 5 |  4 | 16 | 3', 'Conditions | OpCode | Register A (Source1) | Immediate | -',
+ins ('32', 'cmpi', 'compare (rS1 - imm)', '4 | 5 |  4 | 16 | 3',
+'Conditions | OpCode (11001) | Register A (Source1) | Immediate | -',
 'This instructions compares the the source register with the immediate be subtracting the immediate from register A and setting the flags accordingly',
 'is set to the MSB of the result|is set if the subtraction has a carry out|is set if an overflow occurred|is set if the result is zero');
-