summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beasm.c
Commit message (Collapse)AuthorAge
* beasm: Allow be_Asm nodes as control flow nodes.Christoph Mallon2019-04-05
| | | | This is done by treating them as fragile.
* beasm: Give label constraints the "register" class 'exec'.Christoph Mallon2019-04-05
|
* beasm: Do not confuse the additional register pressure handling with exec ↵Christoph Mallon2019-04-05
| | | | outputs.
* beasm: Tell the backends how to handle the fallthrough exec output of be_Asm.Christoph Mallon2019-04-05
|
* be, ir: Give be_Asm and ASM a fallthrough exec output.Christoph Mallon2019-04-05
|
* beasm: Handle operand modifier 'l' in all backends.Christoph Mallon2019-04-05
|
* beasm: Add BE_ASM_OPERAND_LABEL and tell the backends how to emit it.Christoph Mallon2019-04-05
|
* be: Refine modelling of additional register pressure.Christoph Mallon2019-03-24
| | | | | | | | | | | | | | | | | | Now additional pressure is applied to the register pressure either before (positive value) or after (negative value) the instruction. So far the value was applied to both the register pressure before and after the instruction. This leads to overapproximation, e.g. for cltd (in: eax, out: edx). When the input lives through then the register pressure after the instruction is 2, but +1 additional pressure unnecessarily increases it to 3. Now the additional pressure is applied to either the register pressure before or after the instruction. For cltd applying it only before the instruction is optimal, because the output can never be paired with the input. Typical symptom was overspilling around cltd+idiv. This still can overapproximate the actual register demand when in/out pairing depends on whether an input lives through. E.g. in: eax+reg, out: edx. Then 3 registers are needed when the reg input lives through. (additional pressure before 1) But only 2 registers are needed when the reg input dies. (no additional pressure) This fixes lit/overspill_cltd.c.
* be: Add the typedef 'be_add_pressure_t' for additional register pressure.Christoph Mallon2019-03-19
|
* beasm: Ignore the fixed inputs/outputs when deciding which strategy to use ↵Christoph Mallon2019-03-18
| | | | to make the node register pressure faithful.
* beasm: Do not calculate additional pressure for register classes with manual ↵Christoph Mallon2019-03-04
| | | | register allocation.
* beasm: More consistent use of input/output counts in be_make_asm().Christoph Mallon2019-03-04
|
* beasm: Only handle an early clobber when it is a register output.Christoph Mallon2018-07-21
| | | | This fixes x86code/early_clobber3.c.
* beasm: Remove inputs with matching outputs from early clobber handling.Christoph Mallon2018-07-20
| | | | | | This improves handling of early clobbers but still overestimates the register demand in other cases. This fixes x86code/early_clobber2.c.
* beasm: Write the updated output requirement for an early clobber into the ↵Christoph Mallon2018-07-20
| | | | correct slot.
* be: Assert that the register class index for additional pressure is valid.Christoph Mallon2018-05-29
|
* be, ir: For consistency memory now is the first output of ASM and be_Asm.Christoph Mallon2018-05-28
|
* be: For consistency make memory the first input of be_Asm.Christoph Mallon2018-05-28
|
* be: Use the correct output position when processing early clobbers.Christoph Mallon2018-05-28
| | | | | This was broken when overhauling the constraint representation in the IR. Though it went unnoticed because not test case in the test suite triggers the issue.
* ir: Overhaul representation of ASM constraints in the IR.Christoph Mallon2018-05-11
| | | | | | | | | | Now the constraints are a mapping from the template position to the input/output positions instead of the other way round. Also there is only one list of constraints instead of a separate one for input and output. This simplifies handling quite a bit, in particular the numbering. E.g. "=m" actually is an input (for the address) and this caused miscounting when the constraints were processed. Also processing of 64 bit operands also lead to miscounting. This fixes x86code/asm_test15.c and x86code/asm_test19.c
* be: Factor out code to prepare information collection for an asm node.Christoph Mallon2018-05-09
|
* be: Add mechanism for a architecture-specific name prefix for registers.Christoph Mallon2018-05-05
|
* be: Ignore clobbering of unusable registers.Christoph Mallon2018-05-05
| | | | | This seems to be what gcc does. This fixes sparccode/clobbernames.c on sparc.
* be: Handle clobbers in be_make_asm().Christoph Mallon2018-05-04
| | | | | So far only amd64 and ia32 handled clobbers. Now it works for all backends, though not enabled yet.
* be: Always accept '#' and '%' as prefix when reading a register name.Christoph Mallon2018-05-04
| | | | | GCC accepts this, too. This fixes backend/asm_clobber_prefix.c on amd64 and ia32.
* be: Factor out parsing of register names for clobbers.Christoph Mallon2018-05-04
|
* be: Small cleanup in be_make_asm().Christoph Mallon2018-04-29
|
* be: Remove case for empty asm constraint.Christoph Mallon2018-04-29
| | | | A constraint is never empty.
* Rework target initialization and queryMatthias Braun2017-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | - Moves machine triple handling code form cparser into libfirm - Create new APIs to set the target and query information about it - Move backend_params into the new target API - Backends initialize ir_target instead of backend_params now - Add new API to get information about the target platform: - Mangle a name for the target platform (and remove compilerlib mangling callback) - Can query size and alignment of basic C types for the platform - Move some constant target information into arch_isa_if_t (we move it to target_info_t later when we realize it needs to be dynamic) - Redo backend initialization. Examples: Simple case: Initialize for host: ir_init(); Complex case: cross-compile to sparc with PIC enabled: ir_init_library(); ir_target_set("sparc-leon-linux-gnu"); ir_target_option("pic"); ir_target_init();
* Reorganize include directivesMatthias Braun2017-02-17
|
* be: Factor out code to check, whether the kind of an asm constraint is valid ↵Christoph Mallon2017-01-02
| | | | of the given modifier.
* be: Make the kind of asm constraints backend-independent.Christoph Mallon2017-01-02
|
* be: Improve error handling when parsing asm constraints.Christoph Mallon2016-11-28
|
* beemitter: Move helper function to beemithlpMatthias Braun2016-02-08
| | | | | Only keep the basics necessary to emit text lines in beemitter.[ch] and move all the other convenience stuff to beemithlp.[ch].
* be: Assert that 'in' and 'in_reqs' have the same length in be_make_asm().Christoph Mallon2016-01-25
|
* be: Use the correct loop limit when handling early clobbers in be_make_asm().Christoph Mallon2016-01-25
| | | | This resolves and out of bounds access.
* Add stub support for the asm constraint modifier '%'.Christoph Mallon2016-01-24
|
* be: Pass the input requirements directly to the constructors of nodes, which ↵Christoph Mallon2015-09-08
| | | | have a variable number of arguments.
* be: Introduce a constraint for memory outputs.Christoph Mallon2015-07-27
|
* beasm: Remove pointless null pointer check.Christoph Mallon2015-07-27
| | | | match_requirement() cannot be called with a requirement without a register class.
* ia32, beasm: Specify additional pressureMatthias Braun2015-07-23
| | | | This avoids AnyVal/additional Keep constructins.
* bearch: Use bool:1 instead of a bitset for remainin reg_req typesMatthias Braun2015-07-01
|
* bearch: rework must_be_different constraintMatthias Braun2015-07-01
| | | | | | - Rename other_different field to must_be_different - Remove arch_register_req_type_must_be_different, it's enough to see if the must_be_different field is not zero.
* bearch: rework should_be_same constraintMatthias Braun2015-07-01
| | | | | | - Rename other_same field to should_be_same. - Remove arch_register_req_type_other_same, it's enough to see if the should_be_same field is not zero.
* remove arch_register_req_type_limited, look whether the limited pointer is ↵Matthias Braun2015-06-19
| | | | != NULL instead
* be: Handle '%=' in asm.Christoph Mallon2015-06-05
|
* be: Move handling of early clobbers into be_mask_asm().Christoph Mallon2015-06-05
| | | | Now all users of be_mask_asm() can handle early clobbers automatically.
* be: Factorise the code to count the number of asm operands.Christoph Mallon2015-06-05
|
* be: Move the code to try to make an asm node register pressure faithful into ↵Christoph Mallon2015-06-05
| | | | | | be_make_asm(). Now all users of be_make_asm() automatically use this logic.
* be: Let be_make_asm() append the memory input and output.Christoph Mallon2015-06-05
|