@@ -934,6 +934,7 @@ pub enum InlineAsmClobberAbi {
934934 LoongArch ,
935935 PowerPC ,
936936 S390x ,
937+ Bpf ,
937938 Msp430 ,
938939}
939940
@@ -1003,6 +1004,10 @@ impl InlineAsmClobberAbi {
10031004 "C" | "system" => Ok ( InlineAsmClobberAbi :: S390x ) ,
10041005 _ => Err ( & [ "C" , "system" ] ) ,
10051006 } ,
1007+ InlineAsmArch :: Bpf => match name {
1008+ "C" | "system" => Ok ( InlineAsmClobberAbi :: Bpf ) ,
1009+ _ => Err ( & [ "C" , "system" ] ) ,
1010+ } ,
10061011 InlineAsmArch :: Msp430 => match name {
10071012 "C" | "system" => Ok ( InlineAsmClobberAbi :: Msp430 ) ,
10081013 _ => Err ( & [ "C" , "system" ] ) ,
@@ -1278,6 +1283,14 @@ impl InlineAsmClobberAbi {
12781283 a8, a9, a10, a11, a12, a13, a14, a15,
12791284 }
12801285 } ,
1286+ InlineAsmClobberAbi :: Bpf => clobbered_regs ! {
1287+ Bpf BpfInlineAsmReg {
1288+ // Refs: Section 1.1 "Registers and calling convention" in BPF ABI Recommended Conventions and Guidelines v1.0
1289+ // https://www.kernel.org/doc/html/latest/bpf/standardization/abi.html#registers-and-calling-convention
1290+
1291+ r0, r1, r2, r3, r4, r5,
1292+ }
1293+ } ,
12811294 InlineAsmClobberAbi :: Msp430 => clobbered_regs ! {
12821295 Msp430 Msp430InlineAsmReg {
12831296 r11, r12, r13, r14, r15,
0 commit comments