summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-armBlue Swirl2013-01-122-2/+2
|\ | | | | | | | | | | * 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm: target-arm: Fix SWI (SVC) instruction in M profile. target-arm: use type_register() instead of type_register_static()
| * target-arm: Fix SWI (SVC) instruction in M profile.Alex_Rozenman@mentor.com2013-01-111-1/+1
| | | | | | | | | | | | | | | | When do_interrupt_v7m is called with EXCP_SWI, the PC already points to the next instruction. Don't modify it here. Signed-off-by: Alex Rozenman <Alex_Rozenman@mentor.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * target-arm: use type_register() instead of type_register_static()Eduardo Habkost2013-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The type_register_static() interface is documented as: type_register_static: @info: The #TypeInfo of the new type. @info and all of the strings it points to should exist for the life time that the type is registered. But cpu_register() uses a stack variable for the 'info' argument, so it has to use type_register() instead of type_register_static(). Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | Merge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agrafBlue Swirl2013-01-1223-655/+1230
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf: (31 commits) PPC: linux-user: Calculate context pointer explicitly target-ppc: Error out for -cpu host on unknown PVR target-ppc: Slim conversion of model definitions to QOM subclasses PPC: Bring EPR support closer to reality PPC: KVM: set has-idle in guest device tree kvm: Update kernel headers openpic: fix CTPR and de-assertion of interrupts openpic: move IACK to its own function openpic: IRQ_check: search the queue a word at a time openpic: fix sense and priority bits openpic: add some bounds checking for IRQ numbers openpic: use standard bitmap operations Revert "openpic: Accelerate pending irq search" openpic: always call IRQ_check from IRQ_get_next openpic/fsl: critical interrupts ignore mask before v4.1 openpic: make ctpr signed openpic: rework critical interrupt support openpic: make register names correspond better with hw docs ppc/booke: fix crit/mcheck/debug exceptions openpic: lower interrupt when reading the MSI register ...
| * | PPC: linux-user: Calculate context pointer explicitlySamuel Seay2013-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Peter Maydell recommended the change to be more proper. The result was tested and shows coming up with the same proper value. Signed-off-by: Samuel Seay <LightningTH@GMail.com> [agraf: change subject] Signed-off-by: Alexander Graf <agraf@suse.de>
| * | target-ppc: Error out for -cpu host on unknown PVRAndreas Färber2013-01-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we silently exited, with subclasses we got an opcode warning. Instead, explicitly tell the user what's wrong. An indication for this is -cpu ? showing "host" with an all-zero PVR. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | target-ppc: Slim conversion of model definitions to QOM subclassesAndreas Färber2013-01-077-176/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the model list is highly macrofied, keep ppc_def_t for now and save a pointer to it in PowerPCCPUClass. This results in a flat list of subclasses including aliases, to be refined later. Move cpu_ppc_init() to translate_init.c and drop helper.c. Long-term the idea is to turn translate_init.c into a standalone cpu.c. Inline cpu_ppc_usable() into type registration. Split cpu_ppc_register() in two by code movement into the initfn and by turning the remaining part into a realizefn. Move qemu_init_vcpu() call into the new realizefn and adapt create_ppc_opcodes() to return an Error. Change ppc_find_by_pvr() -> ppc_cpu_class_by_pvr(). Change ppc_find_by_name() -> ppc_cpu_class_by_name(). Turn -cpu host into its own subclass. This requires to move the kvm_enabled() check in ppc_cpu_class_by_name() to avoid the class being found via the normal name lookup in the !kvm_enabled() case. Turn kvmppc_host_cpu_def() into the class_init and add an initfn that asserts KVM is in fact enabled. Implement -cpu ? and the QMP equivalent in terms of subclasses. This newly exposes -cpu host to the user, ordered last for -cpu ?. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | PPC: Bring EPR support closer to realityAlexander Graf2013-01-078-46/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already used to support the external proxy facility of FSL MPICs, but only implemented it halfway correctly. This patch adds support for * dynamic enablement of the EPR facility * interrupt acknowledgement only when the interrupt is delivered This way the implementation now is closer to real hardware. Signed-off-by: Alexander Graf <agraf@suse.de>
| * | PPC: KVM: set has-idle in guest device treeStuart Yoder2013-01-073-6/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On e500mc, the platform doesn't provide a way for the CPU to go idle. To still not uselessly burn CPU time, expose an idle hypercall to the guest if kvm supports it. Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com> [agraf: adjust for current code base, add patch description, fix non-kvm case] Signed-off-by: Alexander Graf <agraf@suse.de>
| * | kvm: Update kernel headersAlexander Graf2013-01-078-23/+219
| | | | | | | | | | | | | | | | | | Corresponding kvm.git hash: 18eb54cf4a Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: fix CTPR and de-assertion of interruptsScott Wood2013-01-071-58/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Properly implement level-triggered interrupts by withdrawing an interrupt from the raised queue if the interrupt source de-asserts. Also withdraw from the raised queue if the interrupt becomes masked. When CTPR is written, check whether we need to raise or lower the interrupt output. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: move IACK to its own functionScott Wood2013-01-071-42/+53
| | | | | | | | | | | | | | | | | | | | | | | | Besides making the code cleaner, we will need a separate way to access IACK in order to implement EPR (external proxy) interrupt delivery. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: IRQ_check: search the queue a word at a timeScott Wood2013-01-071-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Search the queue more efficiently by first looking for a non-zero word, and then using the common bit-searching function to find the bit within the word. It would be even nicer if bitops_ffsl() could be hooked up to the compiler intrinsic so that bit-searching instructions could be used, but that's another matter. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: fix sense and priority bitsScott Wood2013-01-071-6/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the sense and priority bits were masked off when writing to IVPR, and all interrupts were treated as edge-triggered (despite the existence of code for handling level-triggered interrupts). Polarity is implemented only as storage. We don't simulate the bad effects that you'd get on real hardware if you set this incorrectly, but at least the guest sees the right thing when it reads back the register. Sense now controls level/edge on FSL external interrupts (and all interrupts on non-FSL MPIC). FSL internal interrupts do not have a sense bit (reads as zero), but are level. FSL timers and IPIs do not have sense or polarity bits (read as zero), and are edge-triggered. To accommodate FSL internal interrupts, QEMU's internal notion of whether an interrupt is level-triggered is separated from the IVPR bit. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: add some bounds checking for IRQ numbersScott Wood2013-01-071-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two checks with abort() guard against potential QEMU-internal problems, but the EOI check stops the guest from causing updates to queue position -1 and other havoc if it writes EOI with no interrupt in service. Signed-off-by: Scott Wood <scottwood@freescale.com> [agraf: remove hunk in code that didn't get applied yet] Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: use standard bitmap operationsScott Wood2013-01-071-26/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Besides the private implementation being redundant, namespace collisions prevented the use of other things in bitops.h. Serialization does get a bit more awkward, unfortunately, since the standard bitmap operations are "unsigned long" rather than "uint32_t", though in exchange we will get faster queue lookups on 64-bit hosts once we search a word at a time. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | Revert "openpic: Accelerate pending irq search"Scott Wood2013-01-071-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a9bd83f4c65de0058659ede009fa1a241f379edd. This counting approach is not robust against setting a bit that was already set, or clearing a bit that was already clear. Perhaps that is considered a bug, but besides the lack of any documentation for that restriction, it's a pretty unpleasant way for the problem to manifest itself. It could be made more robust by testing the current value of the bit before changing the count, but a later patch speeds up IRQ_check in all cases, not just when there's nothing pending. Hopefully that should be adequate to address performance concerns. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: always call IRQ_check from IRQ_get_nextScott Wood2013-01-071-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the code relied on the queue's "next" field getting set to -1 sometime between an update to the bitmap, and the next call to IRQ_get_next. Sometimes this happened after the update. Sometimes it happened before the check. Sometimes it didn't happen at all. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic/fsl: critical interrupts ignore mask before v4.1Scott Wood2013-01-071-1/+4
| | | | | | | | | | | | | | | | | | Signed-off-by: Scott Wood <scottwood@freescale.com> [agraf: make bool :1] Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: make ctpr signedScott Wood2013-01-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Other priorities are signed, so avoid comparisons between signed and unsigned. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: rework critical interrupt supportScott Wood2013-01-071-34/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Critical interrupts on FSL MPIC are not supposed to pay attention to priority, IACK, EOI, etc. On the currently modeled version it's not supposed to pay attention to the mask bit either. Also reorganize to make it easier to implement newer FSL MPIC models, which encode interrupt level information differently and support mcheck as well as crit, and to reduce problems for later patches in this set. Still missing is the ability to lower the CINT signal to the core, as IACK/EOI is not used. This will come with general IRQ-source-driven lowering in the next patch. New state is added which is not serialized, but instead is recomputed in openpic_load() by calling the appropriate write_IRQreg function. This should have the side effect of causing the IRQ outputs to be raised appropriately on load, which was missing. The serialization format is altered by swapping ivpr and idr (we'd like IDR to be restored before we run the IVPR logic), and moving interrupts to the end (so that other state has been restored by the time we run the IDR/IVPR logic. Serialization for this driver is not yet in a state where backwards compatibility is reasonable (assuming it works at all), and the current serialization format was not built for extensibility. Signed-off-by: Scott Wood <scottwood@freescale.com> [agraf: fix for current code state] Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: make register names correspond better with hw docsScott Wood2013-01-071-178/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The base openpic specification doesn't provide abbreviated register names, so it's somewhat understandable that the QEMU code made up its own, except that most of the names that QEMU used didn't correspond to the terminology used by any implementation I could find. In some cases, like PCTP, the phrase "processor current task priority" could be found in the openpic spec when describing the concept, but the register itself was labelled "current task priority register" and every implementation seems to use either CTPR or the full phrase. In other cases, individual implementations disagree on what to call the register. The implementations I have documentation for are Freescale, Raven (MCP750), and IBM. The Raven docs tend to not use abbreviations at all. The IBM MPIC isn't implemented in QEMU. Thus, where there's disagreement I chose to use the Freescale abbreviations. Signed-off-by: Scott Wood <scottwood@freescale.com> [agraf: rebase on current state of the code] Signed-off-by: Alexander Graf <agraf@suse.de>
| * | ppc/booke: fix crit/mcheck/debug exceptionsScott Wood2013-01-071-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Book E does not play games with certain bits of xSRR1 being MSR save bits and others being error status. xSRR1 is the old MSR, period. This was causing things like MSR[CE] to be lost, even in the saved version, as soon as you take an exception. rfci/rfdi/rfmci are fixed to pass the actual xSRR1 register contents, rather than the register number. Put FIXME comments on the hack that is "asrr0/1". The whole point of separate exception levels is so that you can, for example, take a machine check or debug interrupt without corrupting critical-level operations. The right xSRR0/1 set needs to be chosen based on CPU type flags. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: lower interrupt when reading the MSI registerScott Wood2013-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will stop things from breaking once it's properly treated as a level-triggered interrupt. Note that it's the MPIC's MSI cascade interrupts that are level-triggered; the individual MSIs are edge-triggered. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: fix debug printsScott Wood2013-01-071-17/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix various format errors when debug prints are enabled. Also cause error checking to happen even when debug prints are not enabled, and consistently use 0x for hex output. Signed-off-by: Scott Wood <scottwood@freescale.com> [agraf: adjust for more recent code base, prettify DPRINTF macro] Signed-off-by: Alexander Graf <agraf@suse.de>
| * | PPC: fix segfault in signal handling codeSamuel Seay2013-01-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed h2g() macro around the ka->_sa_handler due to the _sa_handler being a guest memory address. Changed the __put_user to put_user as it was attempting to put a value at the stack address but the new address is a guest memory address, __put_user is for host memory addresses. Signed-off-by: Samuel Seay <LightningTH@GMail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> [agraf: change subject line, reformat commit message] Signed-off-by: Alexander Graf <agraf@suse.de>
| * | PPC: Reset qemu timers when guest resetBharat Bhushan2013-01-071-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch install the timer reset handler. This will be called when the guest is reset. Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com> [agraf: adjust for QOM'ification] Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: fix coding style issuesAlexander Graf2013-01-071-45/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following coding style violations: - structs have to be typedef and be CamelCase - if()s are always surrounded by curly braces Signed-off-by: Alexander Graf <agraf@suse.de>
| * | powerpc: linux header sync script includes epapr_hcalls.hBharat Bhushan2013-01-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | epapr_hcalls.h is now referenced by kvm_para.h. so this is needed for QEMU to get compiled on powerpc. Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: don't crash on a register access without a CPU contextScott Wood2013-01-071-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we access a register via the QEMU memory inspection commands (e.g. "xp") rather than from guest code, we won't have a CPU context. Gracefully fail to access the register in that case, rather than crashing. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: s/opp->nb_irqs -1/opp->nb_cpus - 1/Scott Wood2013-01-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | "opp->nb_irqs-1" would have been a minor coding style error, but putting in one space but not the other makes it look confusingly like a numeric literal "-1". Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: BRR1 is not a CPU-specific register.Scott Wood2013-01-071-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's in the address range that normally contains a magic redirection to the CPU-specific region of the curretn CPU, but it isn't actually a per-CPU register. On real hardware BRR1 shows up only at 0x40000, not at 0x60000 or other non-magic per-CPU areas. Plus, this makes it possible to read the register on the QEMU command line with "xp". Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: support large vectors on FSL mpicScott Wood2013-01-071-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously only the spurious vector was sized appropriately to the openpic model. Also, instances of "IPVP_VECTOR(opp->spve)" were replace with just "opp->spve", as opp->spve is already just a vector and not an IVPR. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: remove pcsr (CPU sensitivity register)Scott Wood2013-01-071-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | I could not find this register in any spec (FSL, IBM, or OpenPIC) and the code doesn't do anything with it but initialize, save, or restore it. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | openpic: symbolicize some magic numbersScott Wood2013-01-071-22/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deefine symbolic names for some register bits, and use some that have already been defined. Also convert some register values from hex to decimal when it improves readability. IPVP_PRIORITY_MASK is corrected from (0x1F << 16) to (0xF << 16), in conjunction with making wider use of the symbolic name. I looked at Freescale and IBM MPIC docs and at the base OpenPIC spec, and all three had priority as 4 bits rather than 5. Plus, the magic nubmer that is being replaced with symbolic values treated the field as 4 bits wide. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* | | Merge branch 's390-reorg' of git://repo.or.cz/qemu/rthBlue Swirl2013-01-1216-5937/+6308
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 's390-reorg' of git://repo.or.cz/qemu/rth: (149 commits) target-s390: Claim maintainership target-s390: Use noreturn for exception and load_psw target-s390: Use TCG_CALL_NO_WG for misc helpers target-s390: Use TCG_CALL_NO_WG for integer helpers target-s390: Use TCG_CALL_NO_WG for floating-point helpers target-s390: Use TCG_CALL_NO_WG for memory helpers target-s390: Perform COMPARE AND SWAP inline target-s390: Optimize get_address target-s390: Optimize ADDC/SUBB target-s390: Optimize ADDU/SUBU CC testing target-s390: Tidy comparisons target-s390: Optmize emitting discards target-s390: Optimize XC target-s390: Fix cpu_clone_regs target-s390: Implement LOAD/SET FP AND SIGNAL target-s390: Implement SET ROUNDING MODE target-s390: Use uint64_to_float128 target-s390: Implement LCDFR target-s390: Check insn operand specifications target-s390: Implement CPSDR ...
| * | | target-s390: Claim maintainershipRichard Henderson2013-01-051-0/+1
| | | | | | | | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | target-s390: Use noreturn for exception and load_pswRichard Henderson2013-01-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Both always exit the cpu loop. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | target-s390: Use TCG_CALL_NO_WG for misc helpersRichard Henderson2013-01-051-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | target-s390: Use TCG_CALL_NO_WG for integer helpersRichard Henderson2013-01-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The division routines do not read or write tcg registers, but can raise fixed-point divide exceptions. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | target-s390: Use TCG_CALL_NO_WG for floating-point helpersRichard Henderson2013-01-051-39/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | None of them read or write tcg registers, but most can raise fp exceptions. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | target-s390: Use TCG_CALL_NO_WG for memory helpersRichard Henderson2013-01-051-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Those that do not read or write tcg registers, but can raise exceptions via memory faults. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | target-s390: Perform COMPARE AND SWAP inlineRichard Henderson2013-01-054-96/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Still no proper solution for CONFIG_USER_ONLY, but the system version is significantly better. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | target-s390: Optimize get_addressRichard Henderson2013-01-051-26/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't load the displacement into a register first, add it second so that tcg_gen_addi_i64 can eliminate zeros. Don't mask the displacement first so that we don't turn small negative numbers into large positive numbers. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | target-s390: Optimize ADDC/SUBBRichard Henderson2013-01-051-19/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Giving the proper mask to disas_jcc allows us to generate an inline comparison generating the carry/borrow with setcond. In the very worst case, when we must use the external helper to compute a value for CC, we generate (cc > 1) instead of (cc >> 1), which is only very slightly slower on common cpus. In the very best case, when the CC comes from a COMPARE insn and the compiler is using ALCG with zero, everything folds out to become just the setcond that the compiler wanted. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | target-s390: Optimize ADDU/SUBU CC testingRichard Henderson2013-01-051-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | We can easily generate some masks for logical add/subtract inline. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | target-s390: Tidy comparisonsRichard Henderson2013-01-051-22/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After full conversion, we can audit the uses of LTGT cc ops and see that none of the instructions can ever set CC=3. Thus we can extend the table to treat that bit as ignored. This fixes a regression wrt the pre-conversion translation in which NE was used for both m=6 and m=7. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | target-s390: Optmize emitting discardsRichard Henderson2013-01-051-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While they aren't expensive, they aren't free to process. When we know that the three cc helper variables are dead, don't kill them. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | target-s390: Optimize XCRichard Henderson2013-01-052-4/+48
| | | | | | | | | | | | | | | | | | | | | | | | Notice XC with same address and convert that to store of zero. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | target-s390: Fix cpu_clone_regsRichard Henderson2013-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | R2 is the syscall return register, not R0. Signed-off-by: Richard Henderson <rth@twiddle.net>
OpenPOWER on IntegriCloud