[PATCH] D57339: [compiler rt] Win64 abi requires additional registers for integer arguments

Matthew G McGovern via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 28 09:55:03 PST 2019


mcgov created this revision.
mcgov added reviewers: kubamracek, vitalybuka, rnk.
mcgov added a project: Sanitizers.
Herald added subscribers: Sanitizers, llvm-commits.

Current interception code does not cover all of the required registers on Windows for a specific flavor of MOV, so this patch adds cases to identify the following 5-byte instructions on 64-bit Windows:

mov QWORD PTR [rsp + XX], rdx  <- second integer argument
mov QWORD PTR [rsp + XX], r9    <- third integer argument
mov QWORD PTR [rsp + XX], r8    <- fourth integer argument

The instruction for MOV [...] RCX is already covered in the previous version.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D57339

Files:
  lib/interception/interception_win.cc


Index: lib/interception/interception_win.cc
===================================================================
--- lib/interception/interception_win.cc
+++ lib/interception/interception_win.cc
@@ -554,6 +554,9 @@
     case 0x245c8948:  // 48 89 5c 24 XX : mov QWORD PTR [rsp + XX], rbx
     case 0x24748948:  // 48 89 74 24 XX : mov QWORD PTR [rsp + XX], rsi
     case 0x244C8948:  // 48 89 4C 24 XX : mov QWORD PTR [rsp + XX], rcx
+    case 0x24548948:  // 48 89 54 24 XX : mov QWORD PTR [rsp + XX], rdx
+    case 0x244c894c:  // 4c 89 4c 24 XX : mov QWORD PTR [rsp + XX], r9
+    case 0x2444894c:  // 4c 89 44 24 XX : mov QWORD PTR [rsp + XX], r8
       return 5;
     case 0x24648348:  // 48 83 64 24 XX : and QWORD PTR [rsp + XX], YY
       return 6;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57339.183645.patch
Type: text/x-patch
Size: 756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190128/2704ea0c/attachment.bin>


More information about the llvm-commits mailing list