mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 21:06:06 +00:00

This include 2 fixes: 1. Disallow 'f' for softfloat. 2. Allow 'r' for softfloat. Currently, 'f' is accpeted by clang, then LLVM meets an internal error. 'r' is rejected by LLVM by: couldn't allocate input reg for constraint 'r'. Fixes: #64241, #63632 --------- Co-authored-by: Fangrui Song <i@maskray.me>
10 lines
318 B
C
10 lines
318 B
C
// RUN: %clang_cc1 -triple mips64 -fsyntax-only -verify %s
|
|
// RUN: %clang_cc1 -triple mips64 -target-feature +soft-float -fsyntax-only -verify=softfloat %s
|
|
|
|
// expected-no-diagnostics
|
|
|
|
void test_f(float p) {
|
|
float result = p;
|
|
__asm__("" :: "f"(result)); // softfloat-error{{invalid input constraint 'f' in asm}}
|
|
}
|