From 0a7223996d5f167f23e84b337fccafb26df1c606 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Mon, 4 Oct 2021 01:04:43 +0800 Subject: [PATCH] bindings: update constants from ARM registers --- bindings/dotnet/UnicornManaged/Const/Arm.fs | 23 ++++++++++++++++++- bindings/dotnet/UnicornManaged/Const/X86.fs | 4 +++- bindings/go/unicorn/arm_const.go | 23 ++++++++++++++++++- bindings/go/unicorn/x86_const.go | 4 +++- bindings/java/unicorn/ArmConst.java | 23 ++++++++++++++++++- bindings/java/unicorn/X86Const.java | 4 +++- bindings/pascal/unicorn/ArmConst.pas | 23 ++++++++++++++++++- bindings/pascal/unicorn/X86Const.pas | 4 +++- .../lib/unicorn_engine/arm_const.rb | 23 ++++++++++++++++++- .../lib/unicorn_engine/x86_const.rb | 4 +++- 10 files changed, 125 insertions(+), 10 deletions(-) diff --git a/bindings/dotnet/UnicornManaged/Const/Arm.fs b/bindings/dotnet/UnicornManaged/Const/Arm.fs index 1751fc85..76deda67 100644 --- a/bindings/dotnet/UnicornManaged/Const/Arm.fs +++ b/bindings/dotnet/UnicornManaged/Const/Arm.fs @@ -127,7 +127,28 @@ module Arm = let UC_ARM_REG_MSP = 115 let UC_ARM_REG_PSP = 116 let UC_ARM_REG_CONTROL = 117 - let UC_ARM_REG_ENDING = 118 + let UC_ARM_REG_IAPSR = 118 + let UC_ARM_REG_EAPSR = 119 + let UC_ARM_REG_XPSR = 120 + let UC_ARM_REG_EPSR = 121 + let UC_ARM_REG_IEPSR = 122 + let UC_ARM_REG_PRIMASK = 123 + let UC_ARM_REG_BASEPRI = 124 + let UC_ARM_REG_BASEPRI_MAX = 125 + let UC_ARM_REG_FAULTMASK = 126 + let UC_ARM_REG_APSR_NZCVQ = 127 + let UC_ARM_REG_APSR_G = 128 + let UC_ARM_REG_APSR_NZCVQG = 129 + let UC_ARM_REG_IAPSR_NZCVQ = 130 + let UC_ARM_REG_IAPSR_G = 131 + let UC_ARM_REG_IAPSR_NZCVQG = 132 + let UC_ARM_REG_EAPSR_NZCVQ = 133 + let UC_ARM_REG_EAPSR_G = 134 + let UC_ARM_REG_EAPSR_NZCVQG = 135 + let UC_ARM_REG_XPSR_NZCVQ = 136 + let UC_ARM_REG_XPSR_G = 137 + let UC_ARM_REG_XPSR_NZCVQG = 138 + let UC_ARM_REG_ENDING = 139 // alias registers let UC_ARM_REG_R13 = 12 diff --git a/bindings/dotnet/UnicornManaged/Const/X86.fs b/bindings/dotnet/UnicornManaged/Const/X86.fs index ad16a84f..a2367b01 100644 --- a/bindings/dotnet/UnicornManaged/Const/X86.fs +++ b/bindings/dotnet/UnicornManaged/Const/X86.fs @@ -261,7 +261,9 @@ module X86 = let UC_X86_REG_MXCSR = 249 let UC_X86_REG_FS_BASE = 250 let UC_X86_REG_GS_BASE = 251 - let UC_X86_REG_ENDING = 252 + let UC_X86_REG_FLAGS = 252 + let UC_X86_REG_RFLAGS = 253 + let UC_X86_REG_ENDING = 254 // X86 instructions diff --git a/bindings/go/unicorn/arm_const.go b/bindings/go/unicorn/arm_const.go index d4321c94..eab0e336 100644 --- a/bindings/go/unicorn/arm_const.go +++ b/bindings/go/unicorn/arm_const.go @@ -122,7 +122,28 @@ const ( ARM_REG_MSP = 115 ARM_REG_PSP = 116 ARM_REG_CONTROL = 117 - ARM_REG_ENDING = 118 + ARM_REG_IAPSR = 118 + ARM_REG_EAPSR = 119 + ARM_REG_XPSR = 120 + ARM_REG_EPSR = 121 + ARM_REG_IEPSR = 122 + ARM_REG_PRIMASK = 123 + ARM_REG_BASEPRI = 124 + ARM_REG_BASEPRI_MAX = 125 + ARM_REG_FAULTMASK = 126 + ARM_REG_APSR_NZCVQ = 127 + ARM_REG_APSR_G = 128 + ARM_REG_APSR_NZCVQG = 129 + ARM_REG_IAPSR_NZCVQ = 130 + ARM_REG_IAPSR_G = 131 + ARM_REG_IAPSR_NZCVQG = 132 + ARM_REG_EAPSR_NZCVQ = 133 + ARM_REG_EAPSR_G = 134 + ARM_REG_EAPSR_NZCVQG = 135 + ARM_REG_XPSR_NZCVQ = 136 + ARM_REG_XPSR_G = 137 + ARM_REG_XPSR_NZCVQG = 138 + ARM_REG_ENDING = 139 // alias registers ARM_REG_R13 = 12 diff --git a/bindings/go/unicorn/x86_const.go b/bindings/go/unicorn/x86_const.go index 33899a61..3a9511ec 100644 --- a/bindings/go/unicorn/x86_const.go +++ b/bindings/go/unicorn/x86_const.go @@ -256,7 +256,9 @@ const ( X86_REG_MXCSR = 249 X86_REG_FS_BASE = 250 X86_REG_GS_BASE = 251 - X86_REG_ENDING = 252 + X86_REG_FLAGS = 252 + X86_REG_RFLAGS = 253 + X86_REG_ENDING = 254 // X86 instructions diff --git a/bindings/java/unicorn/ArmConst.java b/bindings/java/unicorn/ArmConst.java index 0bab07a3..4508430a 100644 --- a/bindings/java/unicorn/ArmConst.java +++ b/bindings/java/unicorn/ArmConst.java @@ -124,7 +124,28 @@ public interface ArmConst { public static final int UC_ARM_REG_MSP = 115; public static final int UC_ARM_REG_PSP = 116; public static final int UC_ARM_REG_CONTROL = 117; - public static final int UC_ARM_REG_ENDING = 118; + public static final int UC_ARM_REG_IAPSR = 118; + public static final int UC_ARM_REG_EAPSR = 119; + public static final int UC_ARM_REG_XPSR = 120; + public static final int UC_ARM_REG_EPSR = 121; + public static final int UC_ARM_REG_IEPSR = 122; + public static final int UC_ARM_REG_PRIMASK = 123; + public static final int UC_ARM_REG_BASEPRI = 124; + public static final int UC_ARM_REG_BASEPRI_MAX = 125; + public static final int UC_ARM_REG_FAULTMASK = 126; + public static final int UC_ARM_REG_APSR_NZCVQ = 127; + public static final int UC_ARM_REG_APSR_G = 128; + public static final int UC_ARM_REG_APSR_NZCVQG = 129; + public static final int UC_ARM_REG_IAPSR_NZCVQ = 130; + public static final int UC_ARM_REG_IAPSR_G = 131; + public static final int UC_ARM_REG_IAPSR_NZCVQG = 132; + public static final int UC_ARM_REG_EAPSR_NZCVQ = 133; + public static final int UC_ARM_REG_EAPSR_G = 134; + public static final int UC_ARM_REG_EAPSR_NZCVQG = 135; + public static final int UC_ARM_REG_XPSR_NZCVQ = 136; + public static final int UC_ARM_REG_XPSR_G = 137; + public static final int UC_ARM_REG_XPSR_NZCVQG = 138; + public static final int UC_ARM_REG_ENDING = 139; // alias registers public static final int UC_ARM_REG_R13 = 12; diff --git a/bindings/java/unicorn/X86Const.java b/bindings/java/unicorn/X86Const.java index d7a358bf..ddbb1248 100644 --- a/bindings/java/unicorn/X86Const.java +++ b/bindings/java/unicorn/X86Const.java @@ -258,7 +258,9 @@ public interface X86Const { public static final int UC_X86_REG_MXCSR = 249; public static final int UC_X86_REG_FS_BASE = 250; public static final int UC_X86_REG_GS_BASE = 251; - public static final int UC_X86_REG_ENDING = 252; + public static final int UC_X86_REG_FLAGS = 252; + public static final int UC_X86_REG_RFLAGS = 253; + public static final int UC_X86_REG_ENDING = 254; // X86 instructions diff --git a/bindings/pascal/unicorn/ArmConst.pas b/bindings/pascal/unicorn/ArmConst.pas index eb9fc463..b70b8326 100644 --- a/bindings/pascal/unicorn/ArmConst.pas +++ b/bindings/pascal/unicorn/ArmConst.pas @@ -125,7 +125,28 @@ const UC_ARM_REG_MSP = 115; UC_ARM_REG_PSP = 116; UC_ARM_REG_CONTROL = 117; - UC_ARM_REG_ENDING = 118; + UC_ARM_REG_IAPSR = 118; + UC_ARM_REG_EAPSR = 119; + UC_ARM_REG_XPSR = 120; + UC_ARM_REG_EPSR = 121; + UC_ARM_REG_IEPSR = 122; + UC_ARM_REG_PRIMASK = 123; + UC_ARM_REG_BASEPRI = 124; + UC_ARM_REG_BASEPRI_MAX = 125; + UC_ARM_REG_FAULTMASK = 126; + UC_ARM_REG_APSR_NZCVQ = 127; + UC_ARM_REG_APSR_G = 128; + UC_ARM_REG_APSR_NZCVQG = 129; + UC_ARM_REG_IAPSR_NZCVQ = 130; + UC_ARM_REG_IAPSR_G = 131; + UC_ARM_REG_IAPSR_NZCVQG = 132; + UC_ARM_REG_EAPSR_NZCVQ = 133; + UC_ARM_REG_EAPSR_G = 134; + UC_ARM_REG_EAPSR_NZCVQG = 135; + UC_ARM_REG_XPSR_NZCVQ = 136; + UC_ARM_REG_XPSR_G = 137; + UC_ARM_REG_XPSR_NZCVQG = 138; + UC_ARM_REG_ENDING = 139; // alias registers UC_ARM_REG_R13 = 12; diff --git a/bindings/pascal/unicorn/X86Const.pas b/bindings/pascal/unicorn/X86Const.pas index 27994b6c..b0f71c4d 100644 --- a/bindings/pascal/unicorn/X86Const.pas +++ b/bindings/pascal/unicorn/X86Const.pas @@ -259,7 +259,9 @@ const UC_X86_REG_MXCSR = 249; UC_X86_REG_FS_BASE = 250; UC_X86_REG_GS_BASE = 251; - UC_X86_REG_ENDING = 252; + UC_X86_REG_FLAGS = 252; + UC_X86_REG_RFLAGS = 253; + UC_X86_REG_ENDING = 254; // X86 instructions diff --git a/bindings/ruby/unicorn_gem/lib/unicorn_engine/arm_const.rb b/bindings/ruby/unicorn_gem/lib/unicorn_engine/arm_const.rb index 15df353a..1d908787 100644 --- a/bindings/ruby/unicorn_gem/lib/unicorn_engine/arm_const.rb +++ b/bindings/ruby/unicorn_gem/lib/unicorn_engine/arm_const.rb @@ -122,7 +122,28 @@ module UnicornEngine UC_ARM_REG_MSP = 115 UC_ARM_REG_PSP = 116 UC_ARM_REG_CONTROL = 117 - UC_ARM_REG_ENDING = 118 + UC_ARM_REG_IAPSR = 118 + UC_ARM_REG_EAPSR = 119 + UC_ARM_REG_XPSR = 120 + UC_ARM_REG_EPSR = 121 + UC_ARM_REG_IEPSR = 122 + UC_ARM_REG_PRIMASK = 123 + UC_ARM_REG_BASEPRI = 124 + UC_ARM_REG_BASEPRI_MAX = 125 + UC_ARM_REG_FAULTMASK = 126 + UC_ARM_REG_APSR_NZCVQ = 127 + UC_ARM_REG_APSR_G = 128 + UC_ARM_REG_APSR_NZCVQG = 129 + UC_ARM_REG_IAPSR_NZCVQ = 130 + UC_ARM_REG_IAPSR_G = 131 + UC_ARM_REG_IAPSR_NZCVQG = 132 + UC_ARM_REG_EAPSR_NZCVQ = 133 + UC_ARM_REG_EAPSR_G = 134 + UC_ARM_REG_EAPSR_NZCVQG = 135 + UC_ARM_REG_XPSR_NZCVQ = 136 + UC_ARM_REG_XPSR_G = 137 + UC_ARM_REG_XPSR_NZCVQG = 138 + UC_ARM_REG_ENDING = 139 # alias registers UC_ARM_REG_R13 = 12 diff --git a/bindings/ruby/unicorn_gem/lib/unicorn_engine/x86_const.rb b/bindings/ruby/unicorn_gem/lib/unicorn_engine/x86_const.rb index 8063eec5..0eafa301 100644 --- a/bindings/ruby/unicorn_gem/lib/unicorn_engine/x86_const.rb +++ b/bindings/ruby/unicorn_gem/lib/unicorn_engine/x86_const.rb @@ -256,7 +256,9 @@ module UnicornEngine UC_X86_REG_MXCSR = 249 UC_X86_REG_FS_BASE = 250 UC_X86_REG_GS_BASE = 251 - UC_X86_REG_ENDING = 252 + UC_X86_REG_FLAGS = 252 + UC_X86_REG_RFLAGS = 253 + UC_X86_REG_ENDING = 254 # X86 instructions