Browse Source

+ constants for more RiscV extensions added

florian 1 month ago
parent
commit
3332a7218c
2 changed files with 55 additions and 0 deletions
  1. 10 0
      rtl/linux/linux.pp
  2. 45 0
      tests/test/units/linux/thwprobe.pp

+ 10 - 0
rtl/linux/linux.pp

@@ -619,6 +619,16 @@ Function futimens(fd: cint; const times:TTimespecArr):cint; {$ifdef FPC_USE_LIBC
     RISCV_HWPROBE_EXT_ZCMOP = 1 shl 47;
     RISCV_HWPROBE_EXT_ZCMOP = 1 shl 47;
     RISCV_HWPROBE_EXT_ZAWRS = 1 shl 48;
     RISCV_HWPROBE_EXT_ZAWRS = 1 shl 48;
     RISCV_HWPROBE_EXT_SUPM = 1 shl 49;
     RISCV_HWPROBE_EXT_SUPM = 1 shl 49;
+    RISCV_HWPROBE_EXT_ZFBFMIN = 1 shl 50;
+    RISCV_HWPROBE_EXT_ZIHPM = 1 shl 51;
+    RISCV_HWPROBE_EXT_ZFBMIN = 1 shl 52;
+    RISCV_HWPROBE_EXT_ZVFBFMIN =  1 shl 53;
+    RISCV_HWPROBE_EXT_ZVFBFWMA =  1 shl 54;
+    RISCV_HWPROBE_EXT_ZICBOM = 1 shl 55;
+    RISCV_HWPROBE_EXT_ZAAMO = 1 shl 56;
+    RISCV_HWPROBE_EXT_ZALRSC = 1 shl 57;
+    RISCV_HWPROBE_EXT_ZABHA = 1 shl 58;
+
     RISCV_HWPROBE_KEY_CPUPERF_0 = 5;
     RISCV_HWPROBE_KEY_CPUPERF_0 = 5;
     RISCV_HWPROBE_MISALIGNED_UNKNOWN = 0 shl 0;
     RISCV_HWPROBE_MISALIGNED_UNKNOWN = 0 shl 0;
     RISCV_HWPROBE_MISALIGNED_EMULATED = 1 shl 0;
     RISCV_HWPROBE_MISALIGNED_EMULATED = 1 shl 0;

+ 45 - 0
tests/test/units/linux/thwprobe.pp

@@ -255,4 +255,49 @@ begin
     writeln('SUPM extension supported')
     writeln('SUPM extension supported')
   else
   else
     writeln('  SUPM extension not supported');
     writeln('  SUPM extension not supported');
+
+  if (ariscv_hwprobe.value and RISCV_HWPROBE_EXT_ZFBFMIN)<>0 then
+    writeln('ZFBFMIN extension supported')
+  else
+    writeln('  ZFBFMIN extension not supported');
+
+  if (ariscv_hwprobe.value and RISCV_HWPROBE_EXT_ZVFBFMIN)<>0 then
+    writeln('ZVFBFMIN extension supported')
+  else
+    writeln('  ZVFBFMIN extension not supported');
+
+  if (ariscv_hwprobe.value and RISCV_HWPROBE_EXT_ZVFBFWMA)<>0 then
+    writeln('ZVFBFWMA extension supported')
+  else
+    writeln('  ZVFBFWMA extension not supported');
+
+  if (ariscv_hwprobe.value and RISCV_HWPROBE_EXT_ZVFBFMIN)<>0 then
+    writeln('ZVFBFMIN extension supported')
+  else
+    writeln('  ZVFBFMIN extension not supported');
+
+  if (ariscv_hwprobe.value and RISCV_HWPROBE_EXT_ZVFBFWMA)<>0 then
+    writeln('ZVFBFWMA extension supported')
+  else
+    writeln('  ZVFBFWMA extension not supported');
+
+  if (ariscv_hwprobe.value and RISCV_HWPROBE_EXT_ZICBOM)<>0 then
+    writeln('ZICBOM extension supported')
+  else
+    writeln('  ZICBOM extension not supported');
+
+  if (ariscv_hwprobe.value and RISCV_HWPROBE_EXT_ZAAMO)<>0 then
+    writeln('ZAAMO extension supported')
+  else
+    writeln('  ZAAMO extension not supported');
+
+  if (ariscv_hwprobe.value and RISCV_HWPROBE_EXT_ZALRSC)<>0 then
+    writeln('ZALRSC extension supported')
+  else
+    writeln('  ZALRSC extension not supported');
+
+  if (ariscv_hwprobe.value and RISCV_HWPROBE_EXT_ZABHA)<>0 then
+    writeln('ZABHA extension supported')
+  else
+    writeln('  ZABHA extension not supported');
 end.
 end.