Commit graph

137 commits

Author SHA1 Message Date
anthony cantor
d7590fb029 change module name from llvm.test_llvmpy to llvm.tests.support
this seems to have been forgotten when test stuff was refactored.
2013-12-03 02:37:47 -07:00
Siu Kwan Lam
6e55bfc406 fix spaces redundant trailing spaces and missing line break at EOF 2013-09-18 11:58:05 -05:00
anthony cantor
b303fd532a fixes to make this branch compatible with llvm versions before 3.4 2013-09-18 11:52:22 -05:00
anthony cantor
aa264cee2d added align parameter to llvm.mc.Disassembler.decode
i cant find any method in llvm to automatically get the
correct instruction alignment for disassembling. i thought
it would be MCAsmInfo.getMinInstAlignment, but that value is
1 for the ARM target machine. since that is clearly the wrong
instruction alignment for disassembling arm, the user should
be able to configure the alignment to whatever is needed.
2013-09-18 11:52:22 -05:00
anthony cantor
083586464b add bindings for instruction description methods to MCInstrDesc
use these new bindings instead of MCInstrAnalysis bindings in
llvm.mc.Instr because MCInstrAnalaysis is just a thin layer
encapsulating MCInstrInfo that seems largely pointless.
2013-09-18 11:52:22 -05:00
anthony cantor
3e77a55de3 added methods to Instr which describe possible branch/terminator properties 2013-09-18 11:52:22 -05:00
anthony cantor
65c4558cac added opcode property to llvm.mc.Instr 2013-09-18 11:52:22 -05:00
anthony cantor
43f7330fda llvm.mc.Disassembler.decode now yields the byte sequence which generated the instruction
added custom method to extra.h to return a PyBytes object
from the bytes read from MemoryObject.readBytes.

also moved the generic methods from StringRefMemoryObject
up to MemoryObject
2013-09-18 11:52:22 -05:00
anthony cantor
3c06f0d590 add flags, ts_flags properties for Instr class 2013-09-18 11:52:22 -05:00
anthony cantor
0ed471d336 added example-instruction-info.py
demonstrates getting flag information for an opcode
2013-09-18 11:52:22 -05:00
anthony cantor
8dbfc377ad added functionality to llvm.mc.Instr to print itself
uses binding of printInst on MCInstPrinter for printing
instruction.

also fixed a bug in llvm.mc.Disassembler.decode: idx should
start at zero, and we should pass code.getBase() + idx to
getInstruction. idx must start at zero because the while loop
compares it against code.getExtent() which returns only the
length of bs.
2013-09-18 11:52:21 -05:00
anthony cantor
82d9c787f3 added llvm.mc.Operand class
Operand encapsulates information that llvm provides about an MCOperand
in an instruction.
2013-09-18 11:52:21 -05:00
anthony cantor
87d444c9e9 added tests to testall for llvm.target and llvm.mc
tests dont check for correctness, just exercise the API
2013-09-18 11:52:21 -05:00
anthony cantor
cbf4a61a17 moved the MC data type access to TargetMachine
Disassembler now simply needs a TargetMachine object
and it will be able to access all the descriptor objects
it needs for disassembly through the target machine.
2013-09-18 11:52:21 -05:00
anthony cantor
0e265a2cc5 TargetTransformInfo stuff doesnt work in llvm >= 3.3 2013-09-18 11:52:21 -05:00
anthony cantor
e65f6174a7 some fixes so that test/testall.py will run
some easy changes to core.py which were just conditionals on llvm
version. for the broken tests which i didnt know how to fix i
simply disabled them.
2013-09-18 11:52:21 -05:00
anthony cantor
78be6a7f5f conditionals for compatibility with llvm < 3.4
i only intend to support MC bindings (and anything reliant on MC)
for llvm 3.4 and greater.
2013-09-18 11:52:21 -05:00
anthony cantor
f4bbb18e47 fixed arm test: arm code needs to be reverse b.c. its little endian 2013-09-18 11:52:20 -05:00
anthony cantor
818c9289fc implemented binding for MCDisassembler.getInstruction
also added new llvm.mc module to act as higher level
python access to the MC section of LLVM (added Instr
and Disassembler classes).
2013-09-18 11:52:20 -05:00
anthony cantor
8f2c27ba41 added TargetRegistry_targets_list
this allows all targets to be enumerated. this is generally useful,
but i specifically wanted to be able to see which targets report
having a disassembler. it is necessary to init the various
target components in order for them to report that they have one,
thus i added InitializeAllDisassemblers and InitializeAllAsmParsers
to TargetSelect.py
2013-09-18 11:52:20 -05:00
Siu Kwan Lam
93cd20e933 Fix for python 3 2013-02-27 13:48:08 -06:00
Siu Kwan Lam
a09394cacd Fix a lots of bugs in the newbinding to pass all the tests.
NOTE: debug info has not been implemented yet.
2013-02-13 15:52:53 -06:00
Ilan Schnell
5dd0948c65 cleanup 2013-01-31 17:54:20 -06:00
Siu Kwan Lam
3b1ae9889d Ensure python2.6 support 2013-01-24 11:58:28 -06:00
Mark Florisson
2bef762ba2 Add testcase with debuginfo and trap for gdb 2013-01-23 19:49:38 -06:00
Mark Florisson
b46757f492 Accept list of values and LLVM values as debug descriptors 2013-01-22 11:21:17 -06:00
Mark Florisson
3b75974731 Add basic block and instruction position descriptors 2013-01-21 20:58:32 -06:00
Mark Florisson
3fba8e4adf Support optional LLVM-level debug info 2013-01-21 19:30:46 -06:00
Mark Florisson
f6e687ae66 Allow declarative specification of debug descriptors 2013-01-21 16:54:51 -06:00
Mark Florisson
f05222caec Add file descriptors and per-module metadata caching 2013-01-21 13:04:50 -06:00
Mark Florisson
8c6384f242 Test dwarf compile unit with DW_LANG_C89 2013-01-21 12:41:49 -06:00
Mark Florisson
7c9f73ccc7 Allow debug description of compilation unit 2013-01-21 11:14:17 -06:00
Mark Florisson
93f8c70d19 Expose dwarf constants for debug info generation 2013-01-21 10:52:29 -06:00
Siu Kwan Lam
5b6a1d75f8 Fix breakage of LLVM 3.1.
Add LLVM version number in llvmpy.
2013-01-04 14:24:26 -06:00
Siu Kwan Lam
e2ec14bbb9 Add test to verify new pass APIs and loop-vectorizer. 2013-01-02 17:42:28 -06:00
Siu Kwan Lam
d491d91dd2 Add TBAA Builder 2012-11-29 12:36:54 -06:00
Siu Kwan Lam
2799e9f452 Test for InlineAsm 2012-11-01 11:42:30 -05:00
Siu Kwan Lam
d781e83bd1 can now clone modules 2012-10-19 16:18:24 -05:00
Thomas Kluyver
87ffb437d8 Fix a couple of tests for Python 3 2012-10-10 10:49:48 -05:00
Ilan Schnell
7b0f3cc0c7 move engine builder test 2012-09-22 20:59:03 -05:00
Ilan Schnell
b97dbba105 add target machine test class 2012-09-22 20:52:20 -05:00
Ilan Schnell
bdf9a04e37 add opaque tests 2012-09-22 20:44:01 -05:00
Ilan Schnell
abaeee678f add volatile test 2012-09-22 20:39:00 -05:00
Ilan Schnell
81d6da3ae5 add constant expression test 2012-09-22 20:34:51 -05:00
Siu Kwan Lam
b748d34f48 a simply exercise for tbaa tree building. 2012-09-19 12:31:51 -07:00
Ilan Schnell
77d199e60d add atomic tests 2012-09-12 17:26:03 -05:00
Ilan Schnell
211f273000 add attribute test 2012-09-12 16:26:52 -05:00
Ilan Schnell
e6bfbca6e8 update readme 2012-09-12 15:55:36 -05:00
Ilan Schnell
8af02c5a7e add the assembly test 2012-09-12 15:50:29 -05:00
Ilan Schnell
b8dd256e11 add intrinsic tests to test module 2012-09-12 15:46:20 -05:00