From: Luke Kenneth Casson Leighton Date: Tue, 9 Jun 2020 21:23:30 +0000 (+0100) Subject: whoops code not quite right X-Git-Tag: convert-csv-opcode-to-binary~2491 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc81be08d70ba1be17127340f9d757e948af979d;p=libreriscv.git whoops code not quite right --- diff --git a/3d_gpu/architecture/decoder.mdwn b/3d_gpu/architecture/decoder.mdwn index e340bd143..d9078ec12 100644 --- a/3d_gpu/architecture/decoder.mdwn +++ b/3d_gpu/architecture/decoder.mdwn @@ -42,12 +42,12 @@ That dynamically-determined information will then actively disable ## Fixed point instructions - - `addi`, `addis`, `mulli` - fairly straightforward - extract registers and immediate and translate to the appropriate op - - `addic`, `addic.`, `subfic` - similar to above, but now carry needs to be saved somewhere - - `add[o][.]`, `subf[o][.]`, `adde*`, `subfe*`, `addze*`, `neg*`, `mullw*`, `divw*` - These are more fun. They need to set the carry (if `.` is present) and overflow (if `o` is present) flags, as well as taking in the carry flag for the `e`xtended versions. - - `addex` - uses the overflow flag as a carry in, and if `CY` is set to 1, sets overflow like it would carry. - - `cmp`, `cmpi` - sets bits of the selected comparison result register based on whether the comparison result was greater than, less than, or equal to - - `andi.`, `ori`, `andis.`, `oris`, `xori`, `xoris` - similar to above, though the `and` versions set the flags in `CR0` - - `and*`, `or*`, `xor*`, `nand*`, `eqv*`, `andc*`, `orc*` - similar to the register-register arithmetic instructions above + - addi, addis, mulli - fairly straightforward - extract registers and immediate and translate to the appropriate op + - addic, addic., subfic - similar to above, but now carry needs to be saved somewhere + - add[o][.], subf[o][.], adde\*, subfe\*, addze\*, neg\*, mullw\*, divw\* - These are more fun. They need to set the carry (if . is present) and overflow (if o is present) flags, as well as taking in the carry flag for the extended versions. + - addex - uses the overflow flag as a carry in, and if CY is set to 1, sets overflow like it would carry. + - cmp, cmpi - sets bits of the selected comparison result register based on whether the comparison result was greater than, less than, or equal to + - andi., ori, andis., oris, xori, xoris - similar to above, though the and versions set the flags in CR0 + - and\*, or\*, xor\*, nand\*, eqv\*, andc\*, orc\* - similar to the register-register arithmetic instructions above