LLVM backend for 6502
Go to file
Johnny Chen bb6e9d8cf7 Fixed a crasher in arm disassembler within ARMInstPrinter.cpp after calling
ARM_AM::getSoImmVal(V) with a legitimate so_imm value: #245 rotate right by 2.
Introduce ARM_AM::getSOImmValOneOrNoRotate(unsigned Arg) which is called from
ARMInstPrinter.cpp's printSOImm() function, replacing ARM_AM::getSOImmVal(V).

[12:44:43] johnny:/Volumes/data/llvm/git/trunk (local-trunk) $ gdb Debug/bin/llvm-mc
GNU gdb 6.3.50-20050815 (Apple version gdb-1346) (Fri Sep 18 20:40:51 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ... done

(gdb) set args  -triple=arm-apple-darwin9 -debug-only=arm-disassembler --disassemble
(gdb) r
Starting program: /Volumes/data/llvm/git/trunk/Debug/bin/llvm-mc -triple=arm-apple-darwin9 -debug-only=arm-disassembler --disassemble
Reading symbols for shared libraries ++. done
0xf5 0x71 0xf0 0x53
Opcode=201 Name=MVNi Format=ARM_FORMAT_DPFRM(4)
 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0 
-------------------------------------------------------------------------------------------------
| 0: 1: 0: 1| 0: 0: 1: 1| 1: 1: 1: 1| 0: 0: 0: 0| 0: 1: 1: 1| 0: 0: 0: 1| 1: 1: 1: 1| 0: 1: 0: 1|
-------------------------------------------------------------------------------------------------

	mvnpls	r7, Assertion failed: (V != -1 && "Not a valid so_imm value!"), function printSOImm, file ARMInstPrinter.cpp, line 229.

Program received signal SIGABRT, Aborted.
0x00007fff88c65886 in __kill ()
(gdb) bt
#0  0x00007fff88c65886 in __kill ()
#1  0x00007fff88d05eae in abort ()
#2  0x00007fff88cf2ef0 in __assert_rtn ()
#3  0x000000010020e422 in printSOImm (O=@0x1010bdf80, V=-1, VerboseAsm=false, MAI=0x1020106d0) at ARMInstPrinter.cpp:229
#4  0x000000010020e5fe in llvm::ARMInstPrinter::printSOImmOperand (this=0x1020107e0, MI=0x7fff5fbfee70, OpNum=1, O=@0x1010bdf80) at ARMInstPrinter.cpp:254
#5  0x00000001001ffbc0 in llvm::ARMInstPrinter::printInstruction (this=0x1020107e0, MI=0x7fff5fbfee70, O=@0x1010bdf80) at ARMGenAsmWriter.inc:3236
#6  0x000000010020c27c in llvm::ARMInstPrinter::printInst (this=0x1020107e0, MI=0x7fff5fbfee70, O=@0x1010bdf80) at ARMInstPrinter.cpp:182
#7  0x000000010003cbff in PrintInsts (DisAsm=@0x10200f4e0, Printer=@0x1020107e0, Bytes=@0x7fff5fbff060, SM=@0x7fff5fbff078) at Disassembler.cpp:65
#8  0x000000010003c8b4 in llvm::Disassembler::disassemble (T=@0x1010c13c0, Triple=@0x1010b6798, Buffer=@0x102010690) at Disassembler.cpp:153
#9  0x000000010004095c in DisassembleInput (ProgName=0x7fff5fbff3f0 "/Volumes/data/llvm/git/trunk/Debug/bin/llvm-mc") at llvm-mc.cpp:347
#10 0x000000010003eefb in main (argc=4, argv=0x7fff5fbff298) at llvm-mc.cpp:374
(gdb) q
The program is running.  Exit anyway? (y or n) y
[13:36:26] johnny:/Volumes/data/llvm/git/trunk (local-trunk) $ 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101053 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 18:46:53 +00:00
autoconf configure: Fix default value for optimize_option, I messed up the test condition 2010-04-10 18:56:24 +00:00
bindings add attributes and module level asm to the ocaml bindings, 2010-04-10 17:52:58 +00:00
cmake Tell Valgrind when we modify already-executed machine code so it knows 2010-03-15 04:57:55 +00:00
docs Fix a grammaro. 2010-04-09 18:39:54 +00:00
examples Fix the ocaml kaleidoscope tutorial to fix linking external libraries. 2010-03-21 23:15:13 +00:00
include Enhance ScalarEvolution::isKnownPredicate with support for 2010-04-11 22:16:48 +00:00
lib Fixed a crasher in arm disassembler within ARMInstPrinter.cpp after calling 2010-04-12 18:46:53 +00:00
projects Testing subversion commit access 2010-02-23 15:11:17 +00:00
runtime suck the propagating "has dynamic libs" check into a single makefile 2010-04-09 20:51:47 +00:00
test Fixed a crasher in arm disassembler within ARMInstPrinter.cpp after calling 2010-04-12 18:46:53 +00:00
tools Boolify. 2010-04-12 12:22:19 +00:00
unittests update unit test for api change. 2010-04-05 22:49:48 +00:00
utils If all the bit positions are not specified; do not decode the instructions. 2010-04-09 21:01:02 +00:00
website Prepare for "core" website. 2007-08-03 05:43:35 +00:00
build-for-llvm-top.sh Patch to build llvm with srcdir != objdir from 2009-01-23 08:42:38 +00:00
CMakeLists.txt CMake: Add options for using static runtime on MSVC++ build. 2010-03-18 13:52:05 +00:00
configure configure: Fix default value for optimize_option, I messed up the test condition 2010-04-10 18:56:24 +00:00
CREDITS.TXT Adding the MicroBlaze backend. 2010-02-23 19:15:24 +00:00
LICENSE.TXT 2010 is upon us. 2010-01-09 18:40:31 +00:00
llvm.spec.in
Makefile modernize the do-all-for-me target to run lit 2010-03-21 22:23:02 +00:00
Makefile.common Removed trailing whitespace from Makefiles. 2009-01-09 16:44:42 +00:00
Makefile.config.in whether we enable dylibs or not depends on the host, not the target. 2010-04-12 02:21:38 +00:00
Makefile.rules Second try of initial ARM/Thumb disassembler check-in. It consists of a tablgen 2010-04-02 22:27:38 +00:00
ModuleInfo.txt Patch to build llvm with srcdir != objdir from 2009-01-23 08:42:38 +00:00
README.txt Give packagers some advice about how to build LLVM so it's useful to 2010-02-26 00:54:42 +00:00

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.

If you're writing a package for LLVM, see docs/Packaging.html for our
suggestions.