From 5cab356399c5b7358de571a79aa2aaf060c8a5f4 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Tue, 9 Nov 2010 15:31:00 -0800 Subject: [opcodes, pk, sim, xcc] Tweaked FP encoding --- inst.v | 93 ++++++++++++++++++++++++------------------------------------------ 1 file changed, 34 insertions(+), 59 deletions(-) (limited to 'inst.v') diff --git a/inst.v b/inst.v index 6bb9973..0b81c23 100644 --- a/inst.v +++ b/inst.v @@ -86,63 +86,46 @@ `define MFCR 32'b1111011_0010000000_?????_00000_????? `define MTCR 32'b1111011_0010000001_?????_?????_00000 `define SYNC 32'b1111011_0100000000_00000_00000_00000 -`define SYSCALL 32'b1111011_0110000000_00000_00000_00000 +`define SYSCALL 32'b1111011_011_????????????_00000_00000 `define EI 32'b1101011_0000000000_00000_00000_????? `define DI 32'b1101011_0000000001_00000_00000_????? `define MFPCR 32'b1101011_0010000000_?????_00000_????? `define MTPCR 32'b1101011_0010000001_?????_?????_00000 `define ERET 32'b1101011_0100000000_00000_00000_00000 -`define ADD_S 32'b1101010_0000000000_?????_?????_????? -`define SUB_S 32'b1101010_0000000001_?????_?????_????? -`define MUL_S 32'b1101010_0000000010_?????_?????_????? -`define DIV_S 32'b1101010_0000000011_?????_?????_????? -`define SQRT_S 32'b1101010_0000000100_00000_?????_????? +`define ADD_S 32'b1101010_00_???_00000_?????_?????_????? +`define SUB_S 32'b1101010_00_???_00001_?????_?????_????? +`define MUL_S 32'b1101010_00_???_00010_?????_?????_????? +`define DIV_S 32'b1101010_00_???_00011_?????_?????_????? +`define SQRT_S 32'b1101010_00_???_00100_00000_?????_????? `define SGNINJ_S 32'b1101010_0000000101_?????_?????_????? `define SGNINJN_S 32'b1101010_0000000110_?????_?????_????? `define SGNMUL_S 32'b1101010_0000000111_?????_?????_????? -`define ADD_D 32'b1101010_1100000000_?????_?????_????? -`define SUB_D 32'b1101010_1100000001_?????_?????_????? -`define MUL_D 32'b1101010_1100000010_?????_?????_????? -`define DIV_D 32'b1101010_1100000011_?????_?????_????? -`define SQRT_D 32'b1101010_1100000100_00000_?????_????? +`define ADD_D 32'b1101010_11_???_00000_?????_?????_????? +`define SUB_D 32'b1101010_11_???_00001_?????_?????_????? +`define MUL_D 32'b1101010_11_???_00010_?????_?????_????? +`define DIV_D 32'b1101010_11_???_00011_?????_?????_????? +`define SQRT_D 32'b1101010_11_???_00100_00000_?????_????? `define SGNINJ_D 32'b1101010_1100000101_?????_?????_????? `define SGNINJN_D 32'b1101010_1100000110_?????_?????_????? `define SGNMUL_D 32'b1101010_1100000111_?????_?????_????? -`define ADD_S_RM 32'b1101010_001_??_00000_?????_?????_????? -`define SUB_S_RM 32'b1101010_001_??_00001_?????_?????_????? -`define MUL_S_RM 32'b1101010_001_??_00010_?????_?????_????? -`define DIV_S_RM 32'b1101010_001_??_00011_?????_?????_????? -`define SQRT_S_RM 32'b1101010_001_??_00100_00000_?????_????? -`define ADD_D_RM 32'b1101010_111_??_00000_?????_?????_????? -`define SUB_D_RM 32'b1101010_111_??_00001_?????_?????_????? -`define MUL_D_RM 32'b1101010_111_??_00010_?????_?????_????? -`define DIV_D_RM 32'b1101010_111_??_00011_?????_?????_????? -`define SQRT_D_RM 32'b1101010_111_??_00100_00000_?????_????? -`define CVT_L_S_RM 32'b1101010_001_??_01000_00000_?????_????? -`define CVTU_L_S_RM 32'b1101010_001_??_01001_00000_?????_????? -`define CVT_W_S_RM 32'b1101010_001_??_01010_00000_?????_????? -`define CVTU_W_S_RM 32'b1101010_001_??_01011_00000_?????_????? -`define CVT_L_D_RM 32'b1101010_111_??_01000_00000_?????_????? -`define CVTU_L_D_RM 32'b1101010_111_??_01001_00000_?????_????? -`define CVT_W_D_RM 32'b1101010_111_??_01010_00000_?????_????? -`define CVTU_W_D_RM 32'b1101010_111_??_01011_00000_?????_????? -`define CVT_S_L 32'b1101010_0000001100_00000_?????_????? -`define CVTU_S_L 32'b1101010_0000001101_00000_?????_????? -`define CVT_S_W 32'b1101010_0000001110_00000_?????_????? -`define CVTU_S_W 32'b1101010_0000001111_00000_?????_????? -`define CVT_D_L 32'b1101010_1100001100_00000_?????_????? -`define CVTU_D_L 32'b1101010_1100001101_00000_?????_????? +`define CVT_L_S 32'b1101010_00_???_01000_00000_?????_????? +`define CVTU_L_S 32'b1101010_00_???_01001_00000_?????_????? +`define CVT_W_S 32'b1101010_00_???_01010_00000_?????_????? +`define CVTU_W_S 32'b1101010_00_???_01011_00000_?????_????? +`define CVT_L_D 32'b1101010_11_???_01000_00000_?????_????? +`define CVTU_L_D 32'b1101010_11_???_01001_00000_?????_????? +`define CVT_W_D 32'b1101010_11_???_01010_00000_?????_????? +`define CVTU_W_D 32'b1101010_11_???_01011_00000_?????_????? +`define CVT_S_L 32'b1101010_00_???_01100_00000_?????_????? +`define CVTU_S_L 32'b1101010_00_???_01101_00000_?????_????? +`define CVT_S_W 32'b1101010_00_???_01110_00000_?????_????? +`define CVTU_S_W 32'b1101010_00_???_01111_00000_?????_????? +`define CVT_D_L 32'b1101010_11_???_01100_00000_?????_????? +`define CVTU_D_L 32'b1101010_11_???_01101_00000_?????_????? `define CVT_D_W 32'b1101010_1100001110_00000_?????_????? `define CVTU_D_W 32'b1101010_1100001111_00000_?????_????? -`define CVT_S_L_RM 32'b1101010_001_??_01100_00000_?????_????? -`define CVTU_S_L_RM 32'b1101010_001_??_01101_00000_?????_????? -`define CVT_S_W_RM 32'b1101010_001_??_01110_00000_?????_????? -`define CVTU_S_W_RM 32'b1101010_001_??_01111_00000_?????_????? -`define CVT_D_L_RM 32'b1101010_111_??_01100_00000_?????_????? -`define CVTU_D_L_RM 32'b1101010_111_??_01101_00000_?????_????? -`define CVT_S_D 32'b1101010_0000010011_00000_?????_????? +`define CVT_S_D 32'b1101010_00_???_10011_00000_?????_????? `define CVT_D_S 32'b1101010_1100010000_00000_?????_????? -`define CVT_S_D_RM 32'b1101010_001_??_10011_00000_?????_????? `define C_EQ_S 32'b1101010_0000010101_?????_?????_????? `define C_LT_S 32'b1101010_0000010110_?????_?????_????? `define C_LE_S 32'b1101010_0000010111_?????_?????_????? @@ -160,19 +143,11 @@ `define L_D 32'b1101000_011_????????????_?????_????? `define S_S 32'b1101001_010_???????_?????_?????_????? `define S_D 32'b1101001_011_???????_?????_?????_????? -`define MADD_S 32'b1101100_000_00_?????_?????_?????_????? -`define MSUB_S 32'b1101101_000_00_?????_?????_?????_????? -`define NMSUB_S 32'b1101110_000_00_?????_?????_?????_????? -`define NMADD_S 32'b1101111_000_00_?????_?????_?????_????? -`define MADD_D 32'b1101100_110_00_?????_?????_?????_????? -`define MSUB_D 32'b1101101_110_00_?????_?????_?????_????? -`define NMSUB_D 32'b1101110_110_00_?????_?????_?????_????? -`define NMADD_D 32'b1101111_110_00_?????_?????_?????_????? -`define MADD_S_RM 32'b1101100_001_??_?????_?????_?????_????? -`define MSUB_S_RM 32'b1101101_001_??_?????_?????_?????_????? -`define NMSUB_S_RM 32'b1101110_001_??_?????_?????_?????_????? -`define NMADD_S_RM 32'b1101111_001_??_?????_?????_?????_????? -`define MADD_D_RM 32'b1101100_111_??_?????_?????_?????_????? -`define MSUB_D_RM 32'b1101101_111_??_?????_?????_?????_????? -`define NMSUB_D_RM 32'b1101110_111_??_?????_?????_?????_????? -`define NMADD_D_RM 32'b1101111_111_??_?????_?????_?????_????? +`define MADD_S 32'b1101100_00_???_?????_?????_?????_????? +`define MSUB_S 32'b1101101_00_???_?????_?????_?????_????? +`define NMSUB_S 32'b1101110_00_???_?????_?????_?????_????? +`define NMADD_S 32'b1101111_00_???_?????_?????_?????_????? +`define MADD_D 32'b1101100_11_???_?????_?????_?????_????? +`define MSUB_D 32'b1101101_11_???_?????_?????_?????_????? +`define NMSUB_D 32'b1101110_11_???_?????_?????_?????_????? +`define NMADD_D 32'b1101111_11_???_?????_?????_?????_????? -- cgit v1.1