mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-20 09:24:58 +00:00
LLVM backend for 6502
26d2990e03
apply to rems as well as divs. This fixes PR945 and speeds up ReedSolomon from 14.57s to 10.90s (which is now faster than gcc). It compiles CodeGen/X86/rem.ll into: _test1: subl $4, %esp movl %esi, (%esp) movl $2155905153, %ecx movl 8(%esp), %esi movl %esi, %eax imull %ecx addl %esi, %edx movl %edx, %eax shrl $31, %eax sarl $7, %edx addl %eax, %edx imull $255, %edx, %eax subl %eax, %esi movl %esi, %eax movl (%esp), %esi addl $4, %esp ret _test2: movl 4(%esp), %eax movl %eax, %ecx sarl $31, %ecx shrl $24, %ecx addl %eax, %ecx andl $4294967040, %ecx subl %ecx, %eax ret _test3: subl $4, %esp movl %esi, (%esp) movl $2155905153, %ecx movl 8(%esp), %esi movl %esi, %eax mull %ecx shrl $7, %edx imull $255, %edx, %eax subl %eax, %esi movl %esi, %eax movl (%esp), %esi addl $4, %esp ret instead of div/idiv instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30920 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
autoconf | ||
docs | ||
examples | ||
include/llvm | ||
lib | ||
projects | ||
runtime | ||
test | ||
tools | ||
utils | ||
win32 | ||
Xcode | ||
.cvsignore | ||
configure | ||
CREDITS.TXT | ||
LICENSE.TXT | ||
llvm.spec.in | ||
Makefile | ||
Makefile.common | ||
Makefile.config.in | ||
Makefile.rules | ||
README.txt |
Low Level Virtual Machine (LLVM) ================================ This directory and its subdirectories contain source code for the Low Level Virtual Machine, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments. LLVM is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt. Please see the HTML documentation provided in docs/index.html for further assistance with LLVM.