Skip to content

Commit

Permalink
Fixed CFI directives for MIPS FP regs.
Browse files Browse the repository at this point in the history
  • Loading branch information
yugr committed Apr 11, 2024
1 parent be4ceb6 commit 48a2d14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/mips/table.S.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022-2023 Yury Gribov
* Copyright 2022-2024 Yury Gribov
*
* The MIT License (MIT)
*
Expand Down Expand Up @@ -43,8 +43,8 @@ _${lib_suffix}_save_regs_and_resolve:
#define POP_REG(reg) addiu $$sp, $$sp, 4; .cfi_adjust_cfa_offset -4; lw reg, 0($$sp); .cfi_restore reg

// dwarf_num = 32 + reg_num
#define PUSH_FREG(reg, dwarf_num) addiu $$sp, $$sp, -8; .cfi_adjust_cfa_offset 8; sdc1 reg, 8($$sp); .cfi_rel_offset dwarf_num, 0
#define POP_FREG(reg, dwarf_num) addiu $$sp, $$sp, 8; .cfi_adjust_cfa_offset -8; ldc1 reg, 0($$sp); .cfi_restore dwarf_num
#define PUSH_FREG(reg, dwarf_num) addiu $$sp, $$sp, -8; .cfi_adjust_cfa_offset 8; sdc1 reg, 8($$sp); .cfi_rel_offset dwarf_num, 0; .cfi_rel_offset dwarf_num + 1, 4
#define POP_FREG(reg, dwarf_num) addiu $$sp, $$sp, 8; .cfi_adjust_cfa_offset -8; ldc1 reg, 0($$sp); .cfi_restore dwarf_num; .cfi_restore dwarf_num + 1

PUSH_REG($$ra)
PUSH_REG($$a0)
Expand Down

0 comments on commit 48a2d14

Please sign in to comment.