Jakob Stoklund Olesen
46dec8a11d
Verify Rust source code formatting as part of the unit tests.
...
Only do this is rustfmt is installed, which likely means don't run on Travis
CI.
2016-08-24 16:36:52 -07:00
Jakob Stoklund Olesen
d0db391897
Verify Rust source code formatting as part of the unit tests.
...
Only do this is rustfmt is installed, which likely means don't run on Travis
CI.
2016-08-24 16:36:52 -07:00
Jakob Stoklund Olesen
33235b3981
Pass arguments on to rustfmt.
...
This allows the usage:
src/format-all.sh --write-mode=diff
2016-08-24 16:29:54 -07:00
Jakob Stoklund Olesen
21ba900d19
Pass arguments on to rustfmt.
...
This allows the usage:
src/format-all.sh --write-mode=diff
2016-08-24 16:29:54 -07:00
Jakob Stoklund Olesen
eb03abe864
Allow predicates on both EncRecipe and Encoding.
...
If both specify a predicate, combine them with 'And'.
2016-08-24 16:02:41 -07:00
Jakob Stoklund Olesen
9853657220
Allow predicates on both EncRecipe and Encoding.
...
If both specify a predicate, combine them with 'And'.
2016-08-24 16:02:41 -07:00
Jakob Stoklund Olesen
1a92876989
Add module with commonly used immediate predicates.
2016-08-24 15:22:15 -07:00
Jakob Stoklund Olesen
e812041738
Add module with commonly used immediate predicates.
2016-08-24 15:22:15 -07:00
Jakob Stoklund Olesen
055c7a0374
Clarify that Imm64 holds sign-extended values.
...
When representing smaller integer types, immediate values should be
sign-extended to i64.
2016-08-24 15:22:05 -07:00
Jakob Stoklund Olesen
cdd5872a1b
Clarify that Imm64 holds sign-extended values.
...
When representing smaller integer types, immediate values should be
sign-extended to i64.
2016-08-24 15:22:05 -07:00
Morgan Phillips
125b79c06a
Add additional test cases
2016-08-24 13:13:31 -07:00
Morgan Phillips
ea6eab4b3c
Add additional test cases
2016-08-24 13:13:31 -07:00
Jakob Stoklund Olesen
586fbbc797
Add RISC-V arithmetic w/immediate operand encodings.
...
Add new instruction predicates to support the 'I' encoding recipe: IsSignedInt,
IsUnsignedInt used to test that an immediate operand is in the allowed range.
2016-08-24 08:53:44 -07:00
Jakob Stoklund Olesen
1da15a10d7
Add RISC-V arithmetic w/immediate operand encodings.
...
Add new instruction predicates to support the 'I' encoding recipe: IsSignedInt,
IsUnsignedInt used to test that an immediate operand is in the allowed range.
2016-08-24 08:53:44 -07:00
Jakob Stoklund Olesen
b8509c6273
Add bitwise operations with an immediate operand.
2016-08-24 08:41:05 -07:00
Jakob Stoklund Olesen
5a5688e446
Add bitwise operations with an immediate operand.
2016-08-24 08:41:05 -07:00
Jakob Stoklund Olesen
077c5ce1f6
Create format fields for immediate operands.
...
Each InstructionFormat instance gets data members corresponding to its immediate
operands, so the can be referred to as BinaryImm.imm, for example.
This will be used to construct instruction predicates.
2016-08-24 08:40:51 -07:00
Jakob Stoklund Olesen
fe7ad84129
Create format fields for immediate operands.
...
Each InstructionFormat instance gets data members corresponding to its immediate
operands, so the can be referred to as BinaryImm.imm, for example.
This will be used to construct instruction predicates.
2016-08-24 08:40:51 -07:00
Jakob Stoklund Olesen
9c5637902c
Track the default member name for immediate operands.
...
Usually an instruction firmat has only a single immediate operand called 'imm',
or 'cond' if it is one of the condigtion codes. Add a 'default_member' field to
ImmediateKind to keep track of this default member name in the InstructionData
struct.
2016-08-24 08:40:51 -07:00
Jakob Stoklund Olesen
7ead1e3f6f
Track the default member name for immediate operands.
...
Usually an instruction firmat has only a single immediate operand called 'imm',
or 'cond' if it is one of the condigtion codes. Add a 'default_member' field to
ImmediateKind to keep track of this default member name in the InstructionData
struct.
2016-08-24 08:40:51 -07:00
Jakob Stoklund Olesen
2f322e3d0e
Add script for Python 3 compat checks.
2016-08-24 08:40:51 -07:00
Jakob Stoklund Olesen
2dfeea67e1
Add script for Python 3 compat checks.
2016-08-24 08:40:51 -07:00
Jakob Stoklund Olesen
9da6847805
Python 3 compat.
...
Try to keep our Python sources compatible with both Python 2.7 and 3.
Check with 'pylint --py3k' and 'python -3'.
2016-08-23 16:35:58 -07:00
Jakob Stoklund Olesen
1e1baec50a
Python 3 compat.
...
Try to keep our Python sources compatible with both Python 2.7 and 3.
Check with 'pylint --py3k' and 'python -3'.
2016-08-23 16:35:58 -07:00
Morgan Phillips
c0a9a4fe46
Move dominator tree test cases to their own folder.
2016-08-23 15:42:31 -07:00
Morgan Phillips
cab356bd9f
Move dominator tree test cases to their own folder.
2016-08-23 15:42:31 -07:00
Morgan Phillips
bdefbdeccc
rustfmt changes
2016-08-23 13:37:04 -07:00
Morgan Phillips
102c0049e0
rustfmt changes
2016-08-23 13:37:04 -07:00
Morgan Phillips
d8c587a1bf
Synchronize regex versions
2016-08-23 13:34:40 -07:00
Morgan Phillips
67fdd27d04
Synchronize regex versions
2016-08-23 13:34:40 -07:00
Morgan Phillips
a9e302e861
Modify the dominator tree's intersect method to interact with Basic Blocks
...
Corresponding changes to test cases are also included.
2016-08-23 13:34:40 -07:00
Morgan Phillips
9165eef823
Modify the dominator tree's intersect method to interact with Basic Blocks
...
Corresponding changes to test cases are also included.
2016-08-23 13:34:40 -07:00
Jakob Stoklund Olesen
96b648056d
Upgrade to rustfmt 0.6.0
2016-08-23 11:01:08 -07:00
Jakob Stoklund Olesen
ddd205ff78
Upgrade to rustfmt 0.6.0
2016-08-23 11:01:08 -07:00
Jakob Stoklund Olesen
24870f0db9
Add RISC-V encodings for imediate shifts.
...
Also add the 32-bit shift instructions for RV64.
2016-08-19 15:56:09 -07:00
Jakob Stoklund Olesen
4ebad2060a
Add RISC-V encodings for imediate shifts.
...
Also add the 32-bit shift instructions for RV64.
2016-08-19 15:56:09 -07:00
Jakob Stoklund Olesen
08168e9d50
Add rotate and shift instructions with immediate amounts.
2016-08-19 15:56:09 -07:00
Jakob Stoklund Olesen
da27e65c25
Add rotate and shift instructions with immediate amounts.
2016-08-19 15:56:09 -07:00
Morgan Phillips
202088837b
Merge branch 'master' of github.com:stoklund/cretonne
2016-08-18 14:39:02 -07:00
Morgan Phillips
6952fa8aa4
Merge branch 'master' of github.com:stoklund/cretonne
2016-08-18 14:39:02 -07:00
Morgan Phillips
9b8d2a04fb
Add basic block information to the dominator tree.
...
To be complete the dominator tree must represent idoms as Ebb, Inst pairs, i.e.
bais blocks.
2016-08-18 14:37:32 -07:00
Morgan Phillips
8683541ed3
Add basic block information to the dominator tree.
...
To be complete the dominator tree must represent idoms as Ebb, Inst pairs, i.e.
bais blocks.
2016-08-18 14:37:32 -07:00
Jakob Stoklund Olesen
f9850b1405
Use shared quadratic probing for settings.
2016-08-18 13:45:50 -07:00
Jakob Stoklund Olesen
55f1e69e3e
Use shared quadratic probing for settings.
2016-08-18 13:45:50 -07:00
Jakob Stoklund Olesen
722a3a6ae6
Add a generic implementation of quadratic hash table probing.
...
We have multiple pre-computed constant hash tables that all use the same
quadratic probing algorithm.
Add a constant_hash Rust module to match the meta/constant_hash.py module.
Move the simple_hash() function into constant_hash. Its Python equivalent is in
the constant_hash.py module.
2016-08-18 13:44:17 -07:00
Jakob Stoklund Olesen
15d0108e4b
Add a generic implementation of quadratic hash table probing.
...
We have multiple pre-computed constant hash tables that all use the same
quadratic probing algorithm.
Add a constant_hash Rust module to match the meta/constant_hash.py module.
Move the simple_hash() function into constant_hash. Its Python equivalent is in
the constant_hash.py module.
2016-08-18 13:44:17 -07:00
Jakob Stoklund Olesen
f17ea61593
Move ir::Function into a sub-module.
...
Keep the top-level ir module free of implementation details that are
inadvertently exposed to sub-modules.
2016-08-12 16:46:44 -07:00
Jakob Stoklund Olesen
c3b7fc9a9c
Move ir::Function into a sub-module.
...
Keep the top-level ir module free of implementation details that are
inadvertently exposed to sub-modules.
2016-08-12 16:46:44 -07:00
Jakob Stoklund Olesen
f4258ae293
Use an EntityMap for stack slots.
...
Delete the StackSlots iterator and move the remaining StackSlotData into its
own module.
2016-08-12 16:44:39 -07:00
Jakob Stoklund Olesen
09b7420ca9
Use an EntityMap for stack slots.
...
Delete the StackSlots iterator and move the remaining StackSlotData into its
own module.
2016-08-12 16:44:39 -07:00