diff --git a/gdb/testsuite/gdb.arch/aarch64-fpmr.exp b/gdb/testsuite/gdb.arch/aarch64-fpmr.exp index 72fd977fc67..aadfb68293e 100644 --- a/gdb/testsuite/gdb.arch/aarch64-fpmr.exp +++ b/gdb/testsuite/gdb.arch/aarch64-fpmr.exp @@ -97,3 +97,7 @@ gdb_test_multiple "set \$fpmr=0x3f007f4008" "" { pass "Write to FPMR from GDB" } } + +gdb_test "set \$fpmr=0x1255C041" \ + "\\\[ F8S1=E4M3 F8S2=E5M2 F8D=E4M3 OSM=MaxNormal OSC=MaxNormal LSCALE=85 NSCALE=18 LSCALE2=0 \\\]" \ + "Write 32-bit value to 64-bit register FPMR" diff --git a/gdb/valops.c b/gdb/valops.c index c478bdc3f15..82c796bd254 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -562,7 +562,7 @@ value_cast (struct type *type, struct value *arg2) return value_from_longest (to_type, value_as_long (arg2)); } else if ((code1 == TYPE_CODE_INT || code1 == TYPE_CODE_ENUM - || code1 == TYPE_CODE_RANGE) + || code1 == TYPE_CODE_RANGE || code1 == TYPE_CODE_FLAGS) && (scalar || code2 == TYPE_CODE_PTR || code2 == TYPE_CODE_MEMBERPTR)) {