Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: src/third_party/libdisasm/x86_imm.c

Issue 1821293002: Replace libdisasm with capstone Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/third_party/libdisasm/x86_imm.c
diff --git a/src/third_party/libdisasm/x86_imm.c b/src/third_party/libdisasm/x86_imm.c
deleted file mode 100644
index cd59bfc9abf8a57ce6fbd23ed08d6f713e9a8787..0000000000000000000000000000000000000000
--- a/src/third_party/libdisasm/x86_imm.c
+++ /dev/null
@@ -1,70 +0,0 @@
-#include "qword.h"
-#include "x86_imm.h"
-
-#include <stdio.h>
-
-unsigned int x86_imm_signsized( unsigned char * buf, size_t buf_len,
- void *dest, unsigned int size ) {
- signed char *cp = (signed char *) dest;
- signed short *sp = (signed short *) dest;
- int32_t *lp = (int32_t *) dest;
- qword_t *qp = (qword_t *) dest;
-
- if ( size > buf_len ) {
- return 0;
- }
-
- /* Copy 'size' bytes from *buf to *op
- * return number of bytes copied */
- switch (size) {
- case 1: /* BYTE */
- *cp = *((signed char *) buf);
- break;
- case 2: /* WORD */
- *sp = *((signed short *) buf);
- break;
- case 6:
- case 8: /* QWORD */
- *qp = *((qword_t *) buf);
- break;
- case 4: /* DWORD */
- default:
- *lp = *((int32_t *) buf);
- break;
- }
- return (size);
-}
-
-unsigned int x86_imm_sized( unsigned char * buf, size_t buf_len, void *dest,
- unsigned int size ) {
- unsigned char *cp = (unsigned char *) dest;
- unsigned short *sp = (unsigned short *) dest;
- uint32_t *lp = (uint32_t *) dest;
- qword_t *qp = (qword_t *) dest;
-
- if ( size > buf_len ) {
- return 0;
- }
-
- /* Copy 'size' bytes from *buf to *op
- * return number of bytes copied */
- switch (size) {
- case 1: /* BYTE */
- *cp = *((unsigned char *) buf);
- break;
- case 2: /* WORD */
- *sp = *((unsigned short *) buf);
- break;
- case 6:
- case 8: /* QWORD */
- *qp = *((qword_t *) buf);
- break;
- case 4: /* DWORD */
- default:
- *lp = *((uint32_t *) buf);
- break;
- }
-
- return (size);
-}
-

Powered by Google App Engine
This is Rietveld 408576698