[PATCH] RISC-V: Report error if function declare with different

3 views
Skip to first unread message

Kito Cheng

unread,
Jul 6, 2018, 4:39:07 AM7/6/18
to GCC Patches, pat...@groups.riscv.org, Jim Wilson
Hi all:

This patch implemented TARGET_MERGE_DECL_ATTRIBUTES hook to check the
interrupter is all compatible, tested with rv32ima and rv64ima elf
toolchain.

gcc/ChangeLog
2018-07-06 Kito Cheng <kito....@gmail.com>

* config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
(riscv_expand_epilogue): Add more assertion to check interrupt mode.
(riscv_set_current_function): Extract getting interrupt type to new
function.
(riscv_get_interrupt_type): New function.
(riscv_merge_decl_attributes): New function, checking interrupt type is
same.
(TARGET_MERGE_DECL_ATTRIBUTES): Define.

gcc/testsuite/ChangeLog
2018-07-06 Kito Cheng <kito....@gmail.com>

* gcc.target/riscv/interrupt-conflict-mode.c: New.
0001-RISC-V-Report-error-if-function-declare-with-differe.patch

Kito Cheng

unread,
Jul 12, 2018, 10:53:46 AM7/12/18
to GCC Patches, pat...@groups.riscv.org, Jim Wilson, Palmer Dabbelt
ping.

Jim Wilson

unread,
Jul 12, 2018, 3:59:39 PM7/12/18
to Kito Cheng, GCC Patches, RISC-V Patches, Palmer Dabbelt
Ok.

Committed.

Jim
Reply all
Reply to author
Forward
0 new messages