[compiler-rt] [win/asan] Add a test skeleton for function GetInstructionSize. (PR #116948)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Nov 20 13:14:05 PST 2024
    
    
  
================
@@ -793,6 +793,38 @@ TEST(Interception, EmptyExportTable) {
   EXPECT_EQ(0U, FunPtr);
 }
 
+const struct InstructionSizeData_t {
+  size_t size;       // hold instruction size or 0 for failure, e.g. on control instructions
+  u8 instr[16];
+  size_t rel_offset;
+} data[] = {
+  /* sorted list */
+  {  1, { 0x50 }, 0 },  // 50 : push eax / rax
+};
+
+std::string dumpInstruction(unsigned int arrayIndex, const InstructionSizeData_t& data) {
----------------
bernhardu wrote:
Done
https://github.com/llvm/llvm-project/pull/116948
    
    
More information about the llvm-commits
mailing list