We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Having the following code:
long long func(long long num, unsigned n) { return (num << n); }
results in an assembly like:
$ arc-elf32-gcc -O3 func.c -S -o - .file "func.c" .cpu HS .arc_attribute Tag_ARC_PCS_config, 2 .arc_attribute Tag_ARC_ABI_rf16, 0 .arc_attribute Tag_ARC_ABI_pic, 0 .arc_attribute Tag_ARC_ABI_tls, 0 .arc_attribute Tag_ARC_ABI_sda, 2 .arc_attribute Tag_ARC_ABI_exceptions, 0 .arc_attribute Tag_ARC_CPU_variation, 2 .section .text .align 4 .global func .type func, @function func: not_s r12,r2 lsr_s r3,r0 asl_s r1,r1,r2 asl_s r0,r0,r2 lsr_s r3,r3,r12 btst_s r2,5 or_s r1,r1,r3 mov_s r2,r0 ;4 mov.eq r2,r1 mov_s r1,r2 ;4 j_s.d [blink] sub.ne r0,r0,r0 .size func, .-func .ident "GCC: (ARCompact/ARCv2 ISA elf32 toolchain) 10.2.0" .section .note.GNU-stack,"",@progbits
But there are rooms for improvement:
btst_s r2,5 \ or_s r1,r1,r3 | btst_s r2,5 mov_s r2,r0 |========> or_s r1,r1,r3 mov.eq r2,r1 | mov.ne r1,r0 mov_s r1,r2 /
The text was updated successfully, but these errors were encountered:
claziss
No branches or pull requests
Having the following code:
results in an assembly like:
But there are rooms for improvement:
The text was updated successfully, but these errors were encountered: