Created
January 29, 2014 10:56
-
-
Save jpauli/8685734 to your computer and use it in GitHub Desktop.
memcpy() with a sizeof(void *) size just nicely uses mov
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
160 char *str1 = "mystring"; | |
7ffff6240c71: lea 0xf2(%rip),%rax # 0x7ffff6240d6a | |
7ffff6240c78: mov %rax,-0x8(%rbp) | |
161 char *str2 = NULL; | |
7ffff6240c7c: movq $0x0,-0x10(%rbp) | |
165 memcpy(&str2, &str1, sizeof(char *)); | |
7ffff6240c84: mov -0x8(%rbp),%rax | |
7ffff6240c88: mov %rax,-0x10(%rbp) | |
160 char *str1 = "mystring"; | |
7ffff6240c71: lea 0xf2(%rip),%rax # 0x7ffff6240d6a | |
7ffff6240c78: mov %rax,-0x8(%rbp) | |
161 char *str2 = NULL; | |
7ffff6240c7c: movq $0x0,-0x10(%rbp) | |
164 str2 = str1; | |
7ffff6240c84: mov -0x8(%rbp),%rax | |
7ffff6240c88: mov %rax,-0x10(%rbp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment