简体   繁体   中英

Can I load a floating point # from a GP register

Can I load a floating point from a general purpose register like this:

lwc1  $f12, 0($t4)

It give me this error:
"$f12": operand is of incorrect type

Usually processors don's support something like this. Floating point values can be stored/loaded only to/from memory.
If you want to perform an operation equivalent to C's union , then store the value from your GP register to memory and then read it back in a FP register. If you want to perform a conversion from int to float, then use appropriate load instruction.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM