History

Add support for f{l,s}d in riscv64-gen

Aleksi Hannula committed 1 year ago

Commit 01d1b7b1 parent 19589281 file · +8 −0Browse files

Unified · Split

riscv64-asm.c+8−0
@@ -806,6 +806,9 @@ static void asm_mem_access_opcode(TCCState *s1, int token) · 805 unmodified lines
806806 case TOK_ASM_lwu:
807807 asm_emit_i(token, (0x0 << 2) | 3 | (6 << 12), &ops[0], &ops[1], &ops[2]);
808808 return;
809+ case TOK_ASM_fld:
810+ asm_emit_i(token, (0x1 << 2) | 3 | (3 << 12), &ops[0], &ops[1], &ops[2]);
811+ return;
809812
810813 // s{b|h|w|d} rs2, imm(rs1); S-format (with rsX swapped)
811814 case TOK_ASM_sb:
@@ -820,6 +823,9 @@ static void asm_mem_access_opcode(TCCState *s1, int token) · 8 unmodified lines
820823 case TOK_ASM_sd:
821824 asm_emit_s(token, (0x8 << 2) | 3 | (3 << 12), &ops[1], &ops[0], &ops[2]);
822825 return;
826+ case TOK_ASM_fsd:
827+ asm_emit_s(token, (0x9 << 2) | 3 | (3 << 12), &ops[1], &ops[0], &ops[2]);
828+ return;
823829 }
824830 }
825831
@@ -1272,6 +1278,7 @@ ST_FUNC void asm_opcode(TCCState *s1, int token) · 446 unmodified lines
12721278 case TOK_ASM_lh:
12731279 case TOK_ASM_lw:
12741280 case TOK_ASM_ld:
1281+ case TOK_ASM_fld:
12751282 case TOK_ASM_lbu:
12761283 case TOK_ASM_lhu:
12771284 case TOK_ASM_lwu:
@@ -1279,6 +1286,7 @@ ST_FUNC void asm_opcode(TCCState *s1, int token) · 1 unmodified line
12791286 case TOK_ASM_sh:
12801287 case TOK_ASM_sw:
12811288 case TOK_ASM_sd:
1289+ case TOK_ASM_fsd:
12821290 asm_mem_access_opcode(s1, token);
12831291 break;
12841292

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t