feq.s
riscv_unified_db)RV32 / RV64 (Ratified & Standard Extensions)
main
userFSummary
The feq.s instruction writes 1 to xd if fs1 and fs2 are equal, and 0 otherwise. If either operand is NaN, the result is 0 (not equal). If either operand is a signaling NaN, the invalid flag is set. Positive zero is considered equal to negative zero.
Syntax / Encoding
feq.s xd, fs1, fs2 | 1010000xxxxxxxxxx010xxxxx1010011 (mask=0xfe00707f match=0xa0002053)
Cross-Chip Latency & Throughput (11 cores)
| Microarchitecture | Latency (cycles) | Recip. TP | uops | Ports | Source |
|---|---|---|---|---|---|
| Tenstorrent Ascalon-X | 1 | 1 | 1 | AscalonFP | llvm_sched_models |
| Andes 45-Series | 2 | 1 | 1 | Andes45FMISC | llvm_sched_models |
| MIPS P8700 (RISC-V) | 2 | 1 | 2 | p8700IssueFPUS+p8700FpuApu | llvm_sched_models |
| SiFive P670 / P600 | 2 | 1 | 1 | SiFiveP600F2I | llvm_sched_models |
| SiFive P870 / P800 | 2 | 1 | 1 | SiFiveP800F2I | llvm_sched_models |
| XiangShan KunMingHu | 2 | 0.33 | 1 | XSPipeGroupFALU | llvm_sched_models |
| SiFive 7-Series (U74) | 3 | 1 | 1 | PipeB | llvm_sched_models |
| SpacemiT X100 | 3 | 0.25 | 1 | SMTX100_FQ | llvm_sched_models |
| XiangShan NanHu | 3 | 0.25 | 1 | XS2FMAC | llvm_sched_models |
| Syntacore SCR7 | 4 | 1 | 2 | FPU_IS+FALU | llvm_sched_models |
| SpacemiT X60 (K1) | 6 | 1 | 1 | SMX60_FP | llvm_sched_models |
Binary Encodings (1)
| Width | Format | Bit Pattern | Mask / Match |
|---|---|---|---|
| 32 | RV | 1010000xxxxxxxxxx010xxxxx1010011 | 0xfe00707f / 0xa0002053 |
Operands
| Name | Description |
|---|---|
fs2 | bits [24:20] |
fs1 | bits [19:15] |
xd | bits [11:7] |
Reference Notes
The `feq.s` instruction writes 1 to `xd` if `fs1` and `fs2` are equal, and 0 otherwise. If either operand is NaN, the result is 0 (not equal). If either operand is a signaling NaN, the invalid flag is set. Positive zero is considered equal to negative zero.