mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-28 16:01:31 +00:00
remove the asm immediate error-count test
This commit is contained in:
@@ -47,7 +47,6 @@ set COMMON=-define:ODIN_TEST_FANCY=false -file -vet -strict-style -ignore-unused
|
||||
..\..\..\odin check ..\test_issue_ellipsis_type_call.odin -no-entry-point %COMMON% 2>&1 | find /c "Error:" | findstr /x "10" || exit /b
|
||||
..\..\..\odin check ..\test_issue_foreign_redeclaration.odin -no-entry-point %COMMON% || exit /b
|
||||
..\..\..\odin check ..\test_issue_foreign_redeclaration_mismatch.odin -no-entry-point %COMMON% 2>&1 | find /c "Error:" | findstr /x "1" || exit /b
|
||||
..\..\..\odin check ..\test_issue_asm_immediate_constant.odin -no-entry-point %COMMON% 2>&1 | find /c "Error:" | findstr /x "4" || exit /b
|
||||
..\..\..\odin check ..\test_issue_asm_rip_register.odin -no-entry-point %COMMON% 2>&1 | find /c "Error:" | findstr /x "6" || exit /b
|
||||
..\..\..\odin check ..\test_issue_asm_template_as_value.odin -no-entry-point %COMMON% 2>&1 | find /c "Error:" | findstr /x "10" || exit /b
|
||||
..\..\..\odin build ..\test_issue_7037.odin %COMMON% -o:none || exit /b
|
||||
|
||||
@@ -122,12 +122,6 @@ fi
|
||||
|
||||
# `asm` templates are amd64-only, so this file is empty on every other architecture
|
||||
if [[ "$(uname -m)" == "x86_64" || "$(uname -m)" == "amd64" ]]; then
|
||||
if [[ $($ODIN check ../test_issue_asm_immediate_constant.odin -no-entry-point $COMMON_CHECK 2>&1 >/dev/null | grep -c "Error:") -eq 4 ]]; then
|
||||
echo "SUCCESSFUL 1/1"
|
||||
else
|
||||
echo "SUCCESSFUL 0/1"
|
||||
exit 1
|
||||
fi
|
||||
if [[ $($ODIN check ../test_issue_asm_rip_register.odin -no-entry-point $COMMON_CHECK 2>&1 >/dev/null | grep -c "Error:") -eq 6 ]]; then
|
||||
echo "SUCCESSFUL 1/1"
|
||||
else
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#+build amd64
|
||||
// An `asm` template's `$` parameter is encoded as an immediate, but a runtime value passed to
|
||||
// one was accepted by the checker and only died in the backend, with an unlocated LLVM error.
|
||||
package test_issues
|
||||
|
||||
shl_imm :: asm(a: i32, $n: i32) -> (r: i32) { mov r, a; shl r, n; }
|
||||
|
||||
opaque :: proc() -> i32 {
|
||||
return 5
|
||||
}
|
||||
|
||||
K :: 3
|
||||
|
||||
bad :: proc(v: i32) {
|
||||
x: i32 = 2
|
||||
_ = shl_imm(1, x)
|
||||
_ = shl_imm(1, v)
|
||||
_ = shl_imm(1, opaque())
|
||||
_ = shl_imm(1, x + 1)
|
||||
}
|
||||
|
||||
good :: proc(a: i32) {
|
||||
_ = shl_imm(a, 2)
|
||||
_ = shl_imm(a, K)
|
||||
_ = shl_imm(a, 1 + 1)
|
||||
}
|
||||
Reference in New Issue
Block a user