1 /* SPDX-License-Identifier: GPL-2.0-only */
5 #include "globutil.asl"
9 /* string compare functions */
22 Return(Sizeof(Local0))
25 Method(S2BF, 1, Serialized)
27 Local0 = SLEN(Arg0) + 1
28 Name(BUFF, Buffer(Local0) {})
33 /* Strong string compare. Checks both length and content */
41 Local7 = MIN(Local5, Local6)
43 While(Local4 < Local7) {
44 Local2 = Derefof(Local0[Local4])
45 Local3 = Derefof(Local1[Local4])
46 if (Local2 > Local3) {
49 if (Local2 < Local3) {
55 if (Local4 < Local5) {
58 if (Local4 < Local6) {
66 /* Weak string compare. Checks to find Arg1 at beginning of Arg0.
67 * Fails if length(Arg0) < length(Arg1). Returns 0 on Fail, 1 on
74 if (SLEN(Arg0) < SLEN(Arg1)) {
80 While(Local2 < Local3) {
81 if (Derefof(Local0[Local2]) != Derefof(Local1[Local2])) {
89 /* ARG0 = IRQ Number(0-15)
97 Local0 = Local1 << ARG0