[clang] [RISCV] Allow -mcmodel= to accept large for RV64 (PR #107817)

2024-09-11 Thread Jim Lin via cfe-commits
https://github.com/tclin914 closed https://github.com/llvm/llvm-project/pull/107817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Allow -mcmodel= to accept large for RV64 (PR #107817)

2024-09-11 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM, on the basis the preprocessor changes are in a different PR. https://github.com/llvm/llvm-project/pull/107817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [RISCV] Allow -mcmodel= to accept large for RV64 (PR #107817)

2024-09-10 Thread Jim Lin via cfe-commits
tclin914 wrote: > What I am missing is: > > * adjustments in `clang/lib/Basic/Targets/RISCV.cpp` to emit the macro > `__riscv_cmodel_large` > * new tests in `clang/test/Preprocessor/riscv-cmodel.c` > > Related PRs: > > * [Add __riscv_cmodel_large define for large code model  > riscv-non-isa/r

[clang] [RISCV] Allow -mcmodel= to accept large for RV64 (PR #107817)

2024-09-10 Thread Jim Lin via cfe-commits
https://github.com/tclin914 updated https://github.com/llvm/llvm-project/pull/107817 >From e394e7ca9e769deb3f286f53a48a049340bd51bd Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Mon, 9 Sep 2024 13:09:23 +0800 Subject: [PATCH 1/3] [RISCV] Allow -mcmodel= to accept large for RV64 --- clang/lib/D

[clang] [RISCV] Allow -mcmodel= to accept large for RV64 (PR #107817)

2024-09-10 Thread Christoph Müllner via cfe-commits
https://github.com/cmuellner commented: What I am missing is: * adjustments in `clang/lib/Basic/Targets/RISCV.cpp` to emit the macro `__riscv_cmodel_large` * new tests in `clang/test/Preprocessor/riscv-cmodel.c` Related PRs: * https://github.com/riscv-non-isa/riscv-c-api-doc/pull/86 * https://g

[clang] [RISCV] Allow -mcmodel= to accept large for RV64 (PR #107817)

2024-09-10 Thread Alex Bradbury via cfe-commits
asb wrote: I think we want to set a define for this as well, for consistency with medany and medlow (as tested in test/Preprocessor/riscv-cmodel.c). I submitted a trivial PR to riscv-c-api-doc to add this https://github.com/riscv-non-isa/riscv-c-api-doc/pull/86 which I'd hope lands quickly.

[clang] [RISCV] Allow -mcmodel= to accept large for RV64 (PR #107817)

2024-09-09 Thread Sam Elliott via cfe-commits
lenary wrote: > > What's the status of backend support for the large code model? That would > > presumably be a prerequisite to landing this. > > It was just merged: #70308. I expected I was out of date, thanks for the link. The psABI says the large code model is not compatible with PIC - thi

[clang] [RISCV] Allow -mcmodel= to accept large for RV64 (PR #107817)

2024-09-09 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: > What's the status of backend support for the large code model? That would > presumably be a prerequisite to landing this. It was just merged: https://github.com/llvm/llvm-project/pull/70308. https://github.com/llvm/llvm-project/pull/107817 ___

[clang] [RISCV] Allow -mcmodel= to accept large for RV64 (PR #107817)

2024-09-09 Thread Sam Elliott via cfe-commits
lenary wrote: What's the status of backend support for the large code model? That would presumably be a prerequisite to landing this. https://github.com/llvm/llvm-project/pull/107817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [RISCV] Allow -mcmodel= to accept large for RV64 (PR #107817)

2024-09-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Jim Lin (tclin914) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/107817.diff 2 Files Affected: - (modified) clang/lib/Driver/ToolChains/CommonArgs.cpp (+2-1) - (added) clang/test/Driver/riscv-mcmodel.c (+20)

[clang] [RISCV] Allow -mcmodel= to accept large for RV64 (PR #107817)

2024-09-09 Thread Jim Lin via cfe-commits
https://github.com/tclin914 created https://github.com/llvm/llvm-project/pull/107817 None >From f6da0096e4dcf3f7b5c8da4e8e170e88b7ebb471 Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Mon, 9 Sep 2024 12:59:30 +0800 Subject: [PATCH 1/2] [RISCV] Add testcase for -mcmodel= --- clang/test/Driver/r