mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 16:50:43 +00:00
Adds the four constant Wave32 VOPC compares as registry forms with the relations f and t (guide Table 59 offsets 0 and 7), valid only for the vopc_vcc rule, backed by false_b32/true_b32 primitives. They keep the #239 contract: sources are decoded and checked as for every compare, VCC_LO := EXEC & existing lanes & test, fully written, and the mask is lane-derived. Their MSL wave mask reads no operand bits. A new LLVM-assembled fixture covers F clearing a stale VCC, T and F under partial EXEC, T reading vcc_lo and runtime s_cbranch_vccz on both results; the oracle merged from task/215-vopc-oracle supplies the reference side. Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
25 lines
997 B
Bash
Executable File
25 lines
997 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
set -eu
|
|
|
|
cd "$(dirname "$0")/.."
|
|
llvm_bin=${LLVM_BIN:-$(brew --prefix llvm)/bin}
|
|
scratch=$(mktemp -d)
|
|
trap 'rm -rf "$scratch"' EXIT
|
|
case "${1:-}" in
|
|
--check|"") ;;
|
|
*) printf '%s\n' 'usage: scripts/assemble-fixture.sh [--check]' >&2; exit 2 ;;
|
|
esac
|
|
|
|
for name in add bitwise-branch float-exact or shifts ashr \
|
|
x9-constant-vs x9-constant-ps x9-varying-vs x9-varying-ps x9-transform-vs scalar-alu vector-compare scalar-logic scalar-compare scalar-unary scalar-arith vector-integer vector-compare-ft; do
|
|
"$llvm_bin/llvm-mc" -triple=amdgcn-amd-amdhsa -mcpu=gfx1030 -mattr=+wavefrontsize32 \
|
|
-filetype=obj "fixtures/rdna2/$name.s" -o "$scratch/$name.o"
|
|
"$llvm_bin/llvm-objcopy" -O binary --only-section=.text "$scratch/$name.o" "$scratch/$name.bin"
|
|
if [ "${1:-}" = --check ]; then
|
|
cmp "$scratch/$name.bin" "fixtures/rdna2/$name.bin"
|
|
else
|
|
cp "$scratch/$name.bin" "fixtures/rdna2/$name.bin"
|
|
fi
|
|
done
|