remove the asm immediate error-count test

This commit is contained in:
kalsprite
2026-08-24 17:56:10 -07:00
parent baf5e22e7e
commit 01a6a43065
3 changed files with 0 additions and 33 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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)
}