Skip to content

Instantly share code, notes, and snippets.

Created June 21, 2013 20:20
Embed
What would you like to do?
; compiled via:
; C:\temp>cl /O2 /nologo /c /FAs test.cpp
; Listing generated by Microsoft (R) Optimizing Compiler Version 16.00.40219.01
TITLE C:\temp\test.cpp
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB LIBCMT
INCLUDELIB OLDNAMES
PUBLIC ?f@@YA_KH@Z ; f
EXTRN __allshl:PROC
; Function compile flags: /Ogtpy
; File c:\temp\test.cpp
; COMDAT ?f@@YA_KH@Z
_TEXT SEGMENT
_n$ = 8 ; size = 4
?f@@YA_KH@Z PROC ; f, COMDAT
; 3 : return 1ull << n;
mov ecx, DWORD PTR _n$[esp-4]
mov eax, 1
xor edx, edx
jmp __allshl
?f@@YA_KH@Z ENDP ; f
_TEXT ENDS
END
unsigned long long f(int n)
{
return 1ull << n;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment