diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-07 03:35:47 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-07 03:35:47 +0000 |
commit | 26c3ebda4c57a29040be904d18b696832e091866 (patch) | |
tree | 0444aa77572bfb96a5b17e172486a8f8580eef0c /ia64.s | |
parent | 4e91e024948e6d7736abd95f287628afa2ceee6c (diff) | |
download | ruby-26c3ebda4c57a29040be904d18b696832e091866.tar.gz |
Use ADD instead of MUL
* On recent CPUs, 2-operand MUL's latency is 3 cycle but ADD is 1 cycle.
* clang Optimizes `MUL rax,2` into `ADD rax,rax` but gcc7 doesn't.
* LONG2FIX is compiled into `lea r14,[r15+r15*1+0x1]`; this is 1cycle
and run in parallel if the branch prediction is correct.
* Note that old (RB_POSFIXABLE(f) && RB_NEGFIXABLE(f)) is usually uses
following instructions.
* movabs rax,0x4000000000000000
* add rax,rdi
* js
It needs large immediate and Macro-Fusion is not applied.
ADD and JO is much smaller though it is also Macro-Fusion unfriendly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ia64.s')
0 files changed, 0 insertions, 0 deletions