diff options
Diffstat (limited to 'opcodes/or1k-ibld.c')
-rw-r--r-- | opcodes/or1k-ibld.c | 234 |
1 files changed, 222 insertions, 12 deletions
diff --git a/opcodes/or1k-ibld.c b/opcodes/or1k-ibld.c index 964ec33..6271f5c 100644 --- a/opcodes/or1k-ibld.c +++ b/opcodes/or1k-ibld.c @@ -590,8 +590,36 @@ or1k_cgen_insert_operand (CGEN_CPU_DESC cd, case OR1K_OPERAND_RA : errmsg = insert_normal (cd, fields->f_r2, 0, 0, 20, 5, 32, total_length, buffer); break; + case OR1K_OPERAND_RAD32F : + { +{ + FLD (f_r2) = ((FLD (f_rad32)) & (31)); + FLD (f_raoff_9_1) = ((((SI) (FLD (f_rad32)) >> (5))) & (1)); +} + errmsg = insert_normal (cd, fields->f_r2, 0, 0, 20, 5, 32, total_length, buffer); + if (errmsg) + break; + errmsg = insert_normal (cd, fields->f_raoff_9_1, 0, 0, 9, 1, 32, total_length, buffer); + if (errmsg) + break; + } + break; case OR1K_OPERAND_RADF : - errmsg = insert_normal (cd, fields->f_r1, 0, 0, 25, 5, 32, total_length, buffer); + errmsg = insert_normal (cd, fields->f_r2, 0, 0, 20, 5, 32, total_length, buffer); + break; + case OR1K_OPERAND_RADI : + { +{ + FLD (f_r2) = ((FLD (f_rad32)) & (31)); + FLD (f_raoff_9_1) = ((((SI) (FLD (f_rad32)) >> (5))) & (1)); +} + errmsg = insert_normal (cd, fields->f_r2, 0, 0, 20, 5, 32, total_length, buffer); + if (errmsg) + break; + errmsg = insert_normal (cd, fields->f_raoff_9_1, 0, 0, 9, 1, 32, total_length, buffer); + if (errmsg) + break; + } break; case OR1K_OPERAND_RASF : errmsg = insert_normal (cd, fields->f_r2, 0, 0, 20, 5, 32, total_length, buffer); @@ -599,8 +627,36 @@ or1k_cgen_insert_operand (CGEN_CPU_DESC cd, case OR1K_OPERAND_RB : errmsg = insert_normal (cd, fields->f_r3, 0, 0, 15, 5, 32, total_length, buffer); break; + case OR1K_OPERAND_RBD32F : + { +{ + FLD (f_r3) = ((FLD (f_rbd32)) & (31)); + FLD (f_rboff_8_1) = ((((SI) (FLD (f_rbd32)) >> (5))) & (1)); +} + errmsg = insert_normal (cd, fields->f_r3, 0, 0, 15, 5, 32, total_length, buffer); + if (errmsg) + break; + errmsg = insert_normal (cd, fields->f_rboff_8_1, 0, 0, 8, 1, 32, total_length, buffer); + if (errmsg) + break; + } + break; case OR1K_OPERAND_RBDF : - errmsg = insert_normal (cd, fields->f_r1, 0, 0, 25, 5, 32, total_length, buffer); + errmsg = insert_normal (cd, fields->f_r3, 0, 0, 15, 5, 32, total_length, buffer); + break; + case OR1K_OPERAND_RBDI : + { +{ + FLD (f_r3) = ((FLD (f_rbd32)) & (31)); + FLD (f_rboff_8_1) = ((((SI) (FLD (f_rbd32)) >> (5))) & (1)); +} + errmsg = insert_normal (cd, fields->f_r3, 0, 0, 15, 5, 32, total_length, buffer); + if (errmsg) + break; + errmsg = insert_normal (cd, fields->f_rboff_8_1, 0, 0, 8, 1, 32, total_length, buffer); + if (errmsg) + break; + } break; case OR1K_OPERAND_RBSF : errmsg = insert_normal (cd, fields->f_r3, 0, 0, 15, 5, 32, total_length, buffer); @@ -608,9 +664,37 @@ or1k_cgen_insert_operand (CGEN_CPU_DESC cd, case OR1K_OPERAND_RD : errmsg = insert_normal (cd, fields->f_r1, 0, 0, 25, 5, 32, total_length, buffer); break; + case OR1K_OPERAND_RDD32F : + { +{ + FLD (f_r1) = ((FLD (f_rdd32)) & (31)); + FLD (f_rdoff_10_1) = ((((SI) (FLD (f_rdd32)) >> (5))) & (1)); +} + errmsg = insert_normal (cd, fields->f_r1, 0, 0, 25, 5, 32, total_length, buffer); + if (errmsg) + break; + errmsg = insert_normal (cd, fields->f_rdoff_10_1, 0, 0, 10, 1, 32, total_length, buffer); + if (errmsg) + break; + } + break; case OR1K_OPERAND_RDDF : errmsg = insert_normal (cd, fields->f_r1, 0, 0, 25, 5, 32, total_length, buffer); break; + case OR1K_OPERAND_RDDI : + { +{ + FLD (f_r1) = ((FLD (f_rdd32)) & (31)); + FLD (f_rdoff_10_1) = ((((SI) (FLD (f_rdd32)) >> (5))) & (1)); +} + errmsg = insert_normal (cd, fields->f_r1, 0, 0, 25, 5, 32, total_length, buffer); + if (errmsg) + break; + errmsg = insert_normal (cd, fields->f_rdoff_10_1, 0, 0, 10, 1, 32, total_length, buffer); + if (errmsg) + break; + } + break; case OR1K_OPERAND_RDSF : errmsg = insert_normal (cd, fields->f_r1, 0, 0, 25, 5, 32, total_length, buffer); break; @@ -714,8 +798,26 @@ or1k_cgen_extract_operand (CGEN_CPU_DESC cd, case OR1K_OPERAND_RA : length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 5, 32, total_length, pc, & fields->f_r2); break; + case OR1K_OPERAND_RAD32F : + { + length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 5, 32, total_length, pc, & fields->f_r2); + if (length <= 0) break; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_raoff_9_1); + if (length <= 0) break; + FLD (f_rad32) = ((FLD (f_r2)) | (((FLD (f_raoff_9_1)) << (5)))); + } + break; case OR1K_OPERAND_RADF : - length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_r1); + length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 5, 32, total_length, pc, & fields->f_r2); + break; + case OR1K_OPERAND_RADI : + { + length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 5, 32, total_length, pc, & fields->f_r2); + if (length <= 0) break; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 1, 32, total_length, pc, & fields->f_raoff_9_1); + if (length <= 0) break; + FLD (f_rad32) = ((FLD (f_r2)) | (((FLD (f_raoff_9_1)) << (5)))); + } break; case OR1K_OPERAND_RASF : length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 5, 32, total_length, pc, & fields->f_r2); @@ -723,8 +825,26 @@ or1k_cgen_extract_operand (CGEN_CPU_DESC cd, case OR1K_OPERAND_RB : length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 5, 32, total_length, pc, & fields->f_r3); break; + case OR1K_OPERAND_RBD32F : + { + length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 5, 32, total_length, pc, & fields->f_r3); + if (length <= 0) break; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 1, 32, total_length, pc, & fields->f_rboff_8_1); + if (length <= 0) break; + FLD (f_rbd32) = ((FLD (f_r3)) | (((FLD (f_rboff_8_1)) << (5)))); + } + break; case OR1K_OPERAND_RBDF : - length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_r1); + length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 5, 32, total_length, pc, & fields->f_r3); + break; + case OR1K_OPERAND_RBDI : + { + length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 5, 32, total_length, pc, & fields->f_r3); + if (length <= 0) break; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 1, 32, total_length, pc, & fields->f_rboff_8_1); + if (length <= 0) break; + FLD (f_rbd32) = ((FLD (f_r3)) | (((FLD (f_rboff_8_1)) << (5)))); + } break; case OR1K_OPERAND_RBSF : length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 5, 32, total_length, pc, & fields->f_r3); @@ -732,9 +852,27 @@ or1k_cgen_extract_operand (CGEN_CPU_DESC cd, case OR1K_OPERAND_RD : length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_r1); break; + case OR1K_OPERAND_RDD32F : + { + length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_r1); + if (length <= 0) break; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 1, 32, total_length, pc, & fields->f_rdoff_10_1); + if (length <= 0) break; + FLD (f_rdd32) = ((FLD (f_r1)) | (((FLD (f_rdoff_10_1)) << (5)))); + } + break; case OR1K_OPERAND_RDDF : length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_r1); break; + case OR1K_OPERAND_RDDI : + { + length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_r1); + if (length <= 0) break; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 1, 32, total_length, pc, & fields->f_rdoff_10_1); + if (length <= 0) break; + FLD (f_rdd32) = ((FLD (f_r1)) | (((FLD (f_rdoff_10_1)) << (5)))); + } + break; case OR1K_OPERAND_RDSF : length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_r1); break; @@ -813,8 +951,14 @@ or1k_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case OR1K_OPERAND_RA : value = fields->f_r2; break; + case OR1K_OPERAND_RAD32F : + value = fields->f_rad32; + break; case OR1K_OPERAND_RADF : - value = fields->f_r1; + value = fields->f_r2; + break; + case OR1K_OPERAND_RADI : + value = fields->f_rad32; break; case OR1K_OPERAND_RASF : value = fields->f_r2; @@ -822,8 +966,14 @@ or1k_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case OR1K_OPERAND_RB : value = fields->f_r3; break; + case OR1K_OPERAND_RBD32F : + value = fields->f_rbd32; + break; case OR1K_OPERAND_RBDF : - value = fields->f_r1; + value = fields->f_r3; + break; + case OR1K_OPERAND_RBDI : + value = fields->f_rbd32; break; case OR1K_OPERAND_RBSF : value = fields->f_r3; @@ -831,9 +981,15 @@ or1k_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case OR1K_OPERAND_RD : value = fields->f_r1; break; + case OR1K_OPERAND_RDD32F : + value = fields->f_rdd32; + break; case OR1K_OPERAND_RDDF : value = fields->f_r1; break; + case OR1K_OPERAND_RDDI : + value = fields->f_rdd32; + break; case OR1K_OPERAND_RDSF : value = fields->f_r1; break; @@ -882,8 +1038,14 @@ or1k_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case OR1K_OPERAND_RA : value = fields->f_r2; break; + case OR1K_OPERAND_RAD32F : + value = fields->f_rad32; + break; case OR1K_OPERAND_RADF : - value = fields->f_r1; + value = fields->f_r2; + break; + case OR1K_OPERAND_RADI : + value = fields->f_rad32; break; case OR1K_OPERAND_RASF : value = fields->f_r2; @@ -891,8 +1053,14 @@ or1k_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case OR1K_OPERAND_RB : value = fields->f_r3; break; + case OR1K_OPERAND_RBD32F : + value = fields->f_rbd32; + break; case OR1K_OPERAND_RBDF : - value = fields->f_r1; + value = fields->f_r3; + break; + case OR1K_OPERAND_RBDI : + value = fields->f_rbd32; break; case OR1K_OPERAND_RBSF : value = fields->f_r3; @@ -900,9 +1068,15 @@ or1k_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case OR1K_OPERAND_RD : value = fields->f_r1; break; + case OR1K_OPERAND_RDD32F : + value = fields->f_rdd32; + break; case OR1K_OPERAND_RDDF : value = fields->f_r1; break; + case OR1K_OPERAND_RDDI : + value = fields->f_rdd32; + break; case OR1K_OPERAND_RDSF : value = fields->f_r1; break; @@ -958,8 +1132,14 @@ or1k_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case OR1K_OPERAND_RA : fields->f_r2 = value; break; + case OR1K_OPERAND_RAD32F : + fields->f_rad32 = value; + break; case OR1K_OPERAND_RADF : - fields->f_r1 = value; + fields->f_r2 = value; + break; + case OR1K_OPERAND_RADI : + fields->f_rad32 = value; break; case OR1K_OPERAND_RASF : fields->f_r2 = value; @@ -967,8 +1147,14 @@ or1k_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case OR1K_OPERAND_RB : fields->f_r3 = value; break; + case OR1K_OPERAND_RBD32F : + fields->f_rbd32 = value; + break; case OR1K_OPERAND_RBDF : - fields->f_r1 = value; + fields->f_r3 = value; + break; + case OR1K_OPERAND_RBDI : + fields->f_rbd32 = value; break; case OR1K_OPERAND_RBSF : fields->f_r3 = value; @@ -976,9 +1162,15 @@ or1k_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case OR1K_OPERAND_RD : fields->f_r1 = value; break; + case OR1K_OPERAND_RDD32F : + fields->f_rdd32 = value; + break; case OR1K_OPERAND_RDDF : fields->f_r1 = value; break; + case OR1K_OPERAND_RDDI : + fields->f_rdd32 = value; + break; case OR1K_OPERAND_RDSF : fields->f_r1 = value; break; @@ -1024,8 +1216,14 @@ or1k_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case OR1K_OPERAND_RA : fields->f_r2 = value; break; + case OR1K_OPERAND_RAD32F : + fields->f_rad32 = value; + break; case OR1K_OPERAND_RADF : - fields->f_r1 = value; + fields->f_r2 = value; + break; + case OR1K_OPERAND_RADI : + fields->f_rad32 = value; break; case OR1K_OPERAND_RASF : fields->f_r2 = value; @@ -1033,8 +1231,14 @@ or1k_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case OR1K_OPERAND_RB : fields->f_r3 = value; break; + case OR1K_OPERAND_RBD32F : + fields->f_rbd32 = value; + break; case OR1K_OPERAND_RBDF : - fields->f_r1 = value; + fields->f_r3 = value; + break; + case OR1K_OPERAND_RBDI : + fields->f_rbd32 = value; break; case OR1K_OPERAND_RBSF : fields->f_r3 = value; @@ -1042,9 +1246,15 @@ or1k_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, case OR1K_OPERAND_RD : fields->f_r1 = value; break; + case OR1K_OPERAND_RDD32F : + fields->f_rdd32 = value; + break; case OR1K_OPERAND_RDDF : fields->f_r1 = value; break; + case OR1K_OPERAND_RDDI : + fields->f_rdd32 = value; + break; case OR1K_OPERAND_RDSF : fields->f_r1 = value; break; |