cb424d7448
verify-patch-sanity.py validates every active recipe .patch has internally- consistent hunk line counts — catching the 'malformed patch at line N' failure at commit/CI/preflight time instead of hours into a cook. This cycle hit that class three times (qtwaylandscanner, sddm, xwayland), each only discovered when cookbook tried to apply the patch. Running it across the repo found 29 latent malformed patches (validated against GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22'). They were harmless only because they sit in vendored recipes (baked, not re- applied) — but would fail on any version-bump re-derivation. --fix recounts the hunk headers (body untouched) and repaired all 29. Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test (test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats (empty placeholders, bare-@@ git hunks).
39 lines
705 B
ArmAsm
39 lines
705 B
ArmAsm
# REQUIRES: amdgpu
|
|
# RUN: split-file %s %t
|
|
# RUN: llvm-mc -filetype=obj -triple=amdgcn--amdhsa -mcpu=fiji %t/asm -o %t.o
|
|
# RUN: ld.lld %t.o -o %t/out --script %t/script
|
|
# RUN: llvm-objdump -d %t/out | FileCheck %s
|
|
|
|
|
|
#--- script
|
|
SECTIONS {
|
|
. = 0x1000;
|
|
.text.likely : { *(.text.likely) }
|
|
. = 0x2000;
|
|
.text : { *(.text) }
|
|
. = 0x3000;
|
|
.text.unlikely : { *(.text.unlikely) }
|
|
}
|
|
|
|
|
|
#--- asm
|
|
.section .text.likely
|
|
hot1:
|
|
s_add_i32 s15, s15, 1
|
|
hot2:
|
|
s_add_i32 s13, s13, 1
|
|
.text
|
|
foo:
|
|
s_branch cold2
|
|
s_branch hot2
|
|
.section .text.unlikely
|
|
cold1:
|
|
s_add_i32 s15, s15, 1
|
|
s_add_i32 s14, s14, 1
|
|
cold2:
|
|
s_add_i32 s13, s13, 1
|
|
|
|
# CHECK: <foo>
|
|
# CHECK-NEXT: s_branch 1025
|
|
# CHECK-NEXT: s_branch 64511
|