1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
#include <cctype>
char foo( char c )
{
if( std::isupper(c) ) c = std::tolower(c) ;
return c ;
/* g++ -std=c++11 -pedantic-errors -Wall -Wextra -Werror -O3 -c -S
__Z3fooc:
pushl %esi
pushl %ebx
subl $20, %esp
movl 32(%esp), %edx
movsbl %dl, %esi
movl %edx, %ebx
movl %esi, (%esp)
call *__imp__isupper
testl %eax, %eax
je L2
movl %esi, (%esp)
call *__imp__tolower
movl %eax, %ebx
L2:
addl $20, %esp
movl %ebx, %eax
popl %ebx
popl %esi
ret
*/
}
char bar( char c )
{
c = std::tolower(c) ;
return c ;
/* g++ -std=c++11 -pedantic-errors -Wall -Wextra -Werror -O3 -c -S
subl $28, %esp
movsbl 32(%esp), %eax
movl %eax, (%esp)
call *__imp__tolower
addl $28, %esp
ret */
}
|