summaryrefslogtreecommitdiffstats
path: root/target-i386
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote branch 'luiz/queue/qmp' into qmpqEdgar E. Iglesias2014-01-141-3/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * luiz/queue/qmp: migration: qmp_migrate(): keep working after syntax error qerror: Remove assert_no_error() qemu-option: Remove qemu_opts_create_nofail target-i386: Remove assert_no_error usage hw: Remove assert_no_error usages qdev: Delete dead code error: Add error_abort monitor: add object-add (QMP) and object_add (HMP) command monitor: add object-del (QMP) and object_del (HMP) command qom: catch errors in object_property_add_child qom: fix leak for objects created with -object rng: initialize file descriptor to -1 qemu-monitor: HMP cpu-add wrapper vl: add missing transition debug->finish_migrate Message-Id: 1389045795-18706-1-git-send-email-lcapitulino@redhat.com Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
| * target-i386: Remove assert_no_error usagePeter Crosthwaite2014-01-061-3/+1
| | | | | | | | | | | | | | | | Replace an assert_no_error() usage with the error_abort system. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into stagingAnthony Liguori2014-01-106-71/+90
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QOM CPUState refactorings / X86CPU * TLB invalidation optimizations * X86CPU initialization cleanups * Preparations for X86CPU hot-unplug # gpg: Signature made Tue 24 Dec 2013 04:51:52 AM PST using RSA key ID 3E7E013F # gpg: Good signature from "Andreas Färber <afaerber@suse.de>" # gpg: aka "Andreas Färber <afaerber@suse.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 174F 0347 1BCC 221A 6175 6F96 FA2E D12D 3E7E 013F * afaerber/tags/qom-cpu-for-anthony: target-i386: Cleanup 'foo=val' feature handling target-i386: Cleanup 'foo' feature handling target-i386: Convert 'check' and 'enforce' to static properties target-i386: Convert 'hv_spinlocks' to static property target-i386: Convert 'hv_vapic' to static property target-i386: Convert 'hv_relaxed' to static property cpu-exec: Optimize X86CPU usage in cpu_exec() target-i386: Move apic_state field from CPUX86State to X86CPU cputlb: Tidy memset() of arrays cputlb: Use memset() when flushing entries
| * | target-i386: Cleanup 'foo=val' feature handlingIgor Mammedov2013-12-241-15/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Features family, model, stepping, level, hv_spinlocks are treated similarly when passed from command line, so it's not necessary to handle each of them individually. Collapse them to one catch-all branch which will treat any not explicitly handled feature in format 'foo=val'. Any unknown feature will be rejected by property setter so there is no need to check for unknown feature in cpu_x86_parse_featurestr(), therefore it's replaced by above mentioned catch-all handler. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | target-i386: Cleanup 'foo' feature handlingIgor Mammedov2013-12-241-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Features check, enforce, hv_relaxed and hv_vapic are treated as boolean set to 'on' when passed from command line, so it's not necessary to handle each of them separately. Collapse them to one catch-all branch which will treat any feature in format 'foo' as boolean set to 'on'. Any unknown feature will be rejected by CPU property setter so there is no need to check for unknown feature in cpu_x86_parse_featurestr(), therefore it's replaced by above mentioned catch-all handler. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | target-i386: Convert 'check' and 'enforce' to static propertiesIgor Mammedov2013-12-242-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Additionally convert check_cpuid & enforce_cpuid to bool and make them members of X86CPU * Make 'enforce' feature independent from 'check' Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | target-i386: Convert 'hv_spinlocks' to static propertyIgor Mammedov2013-12-241-1/+44
| | | | | | | | | | | | | | | Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | target-i386: Convert 'hv_vapic' to static propertyIgor Mammedov2013-12-241-1/+2
| | | | | | | | | | | | | | | Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | target-i386: Convert 'hv_relaxed' to static propertyIgor Mammedov2013-12-241-1/+2
| | | | | | | | | | | | | | | Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | target-i386: Move apic_state field from CPUX86State to X86CPUChen Fan2013-12-236-39/+34
| |/ | | | | | | | | | | | | This motion is preparing for refactoring vCPU APIC subsequently. Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* | Merge remote-tracking branch 'rth/ldst-i386-2' into stagingAnthony Liguori2014-01-091-1534/+1111
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rth/ldst-i386-2: (49 commits) target-i386: Tidy ljmp target-i386: Rename gen_op_jmp_T0 to gen_op_jmp_v target-i386: Tidy some size computation target-i386: Remove gen_op_mov_reg_A0 target-i386: Remove gen_op_mov_TN_reg target-i386: Remove gen_op_addl_T0_T1 target-i386: Remove gen_op_mov_reg_T1 target-i386: Remove gen_op_mov_reg_T0 target-i386: Tidy cpu_regs initialization target_i386: Clean up gen_pop_T0 target-i386: Combine gen_push_T* into gen_push_v target-i386: Tidy addr16 code in gen_lea_modrm target-i386: Change dflag to TCGMemOp target-i386: Change gen_op_mov_reg_A0 size parameter to TCGMemOp target-i386: Change aflag to TCGMemOp target-i386: Change gen_op_j*z_ecx size parameter to TCGMemOp target-i386: Change gen_op_add_reg_* size parameter to TCGMemOp target-i386: Use TCGMemOp for 'ot' variables target-i386: Remove gen_op_andl_A0_ffff target-i386: Remove gen_op_movl_T0_T1 ... Message-id: 1389128439-10067-1-git-send-email-rth@twiddle.net Signed-off-by: Anthony Liguori <aliguori@amazon.com>
| * | target-i386: Tidy ljmpRichard Henderson2014-01-071-2/+1
| | | | | | | | | | | | | | | | | | | | | Remove an unnecessary move opcode. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Rename gen_op_jmp_T0 to gen_op_jmp_vRichard Henderson2014-01-071-9/+9
| | | | | | | | | | | | | | | | | | | | | And make the destination argument explicit. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Tidy some size computationRichard Henderson2014-01-071-3/+3
| | | | | | | | | | | | | | | | | | | | | Clean up relics of multiple size domains: - MO_16 + 1 => - 1 + 1 => 0. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Remove gen_op_mov_reg_A0Richard Henderson2014-01-071-6/+1
| | | | | | | | | | | | | | | | | | | | | Replace with its definition. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Remove gen_op_mov_TN_regRichard Henderson2014-01-071-64/+59
| | | | | | | | | | | | | | | | | | | | | Replace with its definition. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Remove gen_op_addl_T0_T1Richard Henderson2014-01-071-8/+3
| | | | | | | | | | | | | | | | | | | | | Replace with its definition. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Remove gen_op_mov_reg_T1Richard Henderson2014-01-071-18/+13
| | | | | | | | | | | | | | | | | | | | | Replace with its definition. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Remove gen_op_mov_reg_T0Richard Henderson2014-01-071-70/+65
| | | | | | | | | | | | | | | | | | | | | Replace with its definition. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Tidy cpu_regs initializationRichard Henderson2014-01-071-51/+36
| | | | | | | | | | | | | | | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target_i386: Clean up gen_pop_T0Richard Henderson2014-01-071-47/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce ifdefs, share more code between paths, reduce the number of TCG ops generated. Avoid re-computing the size of the operation across gen_pop_T0 and gen_pop_update. Add forgotten zero-extension in the TARGET_X86_64, !CODE64, ss32 case. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Combine gen_push_T* into gen_push_vRichard Henderson2014-01-071-74/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce ifdefs, share more code between paths, reduce the number of TCG ops generated. Add forgotten zero-extension in the TARGET_X86_64, !CODE64, ss32 case. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Tidy addr16 code in gen_lea_modrmRichard Henderson2014-01-071-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | Unlike the addr32, there was no bug. But we can use the same technique to reduce the number of TCG ops. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Change dflag to TCGMemOpRichard Henderson2014-01-071-284/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changing the domain to TCGMemOp makes it easier to interoperate with other portions of the rest of the translator. We now only have one domain for size operands inside the translator, which makes things less confusing all the way around. There are still a number of helpers that continue to use the log2-1 domain. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Change gen_op_mov_reg_A0 size parameter to TCGMemOpRichard Henderson2014-01-071-24/+8
| | | | | | | | | | | | | | | | | | | | | | | | Change the domain of the parameter and update all callers. Which lets us defer completely to gen_op_mov_reg_v. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Change aflag to TCGMemOpRichard Henderson2014-01-071-91/+87
| | | | | | | | | | | | | | | | | | | | | | | | Changing the domain to TCGMemOp makes it easier to interoperate with other portions of the rest of the translator. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Change gen_op_j*z_ecx size parameter to TCGMemOpRichard Henderson2014-01-071-10/+10
| | | | | | | | | | | | | | | | | | | | | Change the domain of the parameter and update all callers. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Change gen_op_add_reg_* size parameter to TCGMemOpRichard Henderson2014-01-071-54/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These functions used the aflags/dflags domain, which is log2-1 of the byte size. Confusingly, they used enumeration values from the log2 domain. Change the domain of the parameter and update all callers. Since we're now in a common domain, defer the deposit/extend/mov decision to gen_op_mov_reg_v. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Use TCGMemOp for 'ot' variablesRichard Henderson2014-01-071-50/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'ot' variables (operand type?) hold the log2(byte size) of the operand being manipulated. This is the same as the MO_SIZE subset of the TCGMemOp. Indeed, we often pass 'ot' to the tcg_gen_qemu_ld/st functions. Changing the type from 'int' makes it easier to see what domain the variable should be. This does require adding some default cases to some switch statements, to avoid the 'unhandled enumeration value' warning that would result from the change of type. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Remove gen_op_andl_A0_ffffRichard Henderson2014-01-071-20/+13
| | | | | | | | | | | | | | | | | | | | | | | | Replace it with tcg_gen_ext16u_tl, and in two cases merge with a previous move from cpu_regs. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Remove gen_op_movl_T0_T1Richard Henderson2014-01-071-6/+1
| | | | | | | | | | | | | | | | | | | | | Replace it with its definition. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Remove gen_op_andl_T0_imRichard Henderson2014-01-071-11/+9
| | | | | | | | | | | | | | | | | | | | | Replace it with its definition. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Remove gen_op_andl_T0_ffffRichard Henderson2014-01-071-25/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replace it with tcg_gen_ext16u_tl. In four places we can combine that with a previous move into cpu_T[0], and in one place we can infer that the zero-extension has already happened via the previous load. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Remove gen_movtl_T*_imRichard Henderson2014-01-071-13/+3
| | | | | | | | | | | | | | | | | | | | | Propagate the definitions into all users. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Remove gen_op_mov*_A0_imRichard Henderson2014-01-071-15/+2
| | | | | | | | | | | | | | | | | | | | | | | | Propagate the definitions into all users. In two cases, this allows us to share code between the 32-bit and 64-bit immediate moves. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Remove gen_op_movl_T0_im*Richard Henderson2014-01-071-20/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Propagate the definitions into all users. The only time that gen_op_movl_T1_imu was used, the input was type 'unsigned', so the replacement works identically. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Remove gen_op_movl_T0_im*Richard Henderson2014-01-071-22/+10
| | | | | | | | | | | | | | | | | | | | | | | | Propagate the definition of gen_op_movl_T0_im to all users. The function gen_op_movl_T0_imu was unused. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Remove gen_op_movl_T0_0Richard Henderson2014-01-071-11/+6
| | | | | | | | | | | | | | | | | | | | | Propagate its definition into all users. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Tidy extend + moveRichard Henderson2014-01-071-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the known MO_32/MO_64 cases, we don't need to extend a 32-bit temp into a 64-bit temp before storing into the hardware register. We do need the extension for the MO_8/MO_16 cases, in order for the deposit_tl operation to work, so leave those alone. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Tidy extend + storeRichard Henderson2014-01-071-17/+17
| | | | | | | | | | | | | | | | | | | | | We can now use tcg_gen_qemu_st_i32 directly to avoid the extension. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Tidy load + truncateRichard Henderson2014-01-071-20/+19
| | | | | | | | | | | | | | | | | | | | | We can now use tcg_gen_qemu_ld_i32 directly to avoid the truncation. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Tidy gen_op_mov_TN_reg+tcg_gen_trunc_tl_i32Richard Henderson2014-01-071-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | For the 16 and 32-bit cases, we don't need to truncate via a temporary register. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Use MO_BE for movbeRichard Henderson2014-01-071-35/+5
| | | | | | | | | | | | | | | | | | | | | Fold the bswap into the memory operation. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Remove unused arguments to gen_lea_modrmRichard Henderson2014-01-071-77/+69
| | | | | | | | | | | | | | | | | | | | | The reg_ptr and offset_ptr outputs are universally unused. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Tidy movslRichard Henderson2014-01-071-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Always perform a sign-extending load. In the extremely unlikely case that we've used an 0x66 prefix, the extension to 64-bits is unnecessary but not wrong; the store will still examine only 16 bits. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Tidy mov[sz][bw]Richard Henderson2014-01-071-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | We can use the MO_SIGN bit to tidy the reg-reg switch statement as well as pass it on to gen_op_ld_v, eliminating one call. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Fix typo in gen_push_T1Richard Henderson2014-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | By inspection, obviously we should be storing T[1] not T[0]. This could only happen for x86_64 in 64-bit mode with 0x66 prefix to call insn -- i.e. never. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Remove gen_op_st_T1_A0Richard Henderson2014-01-071-7/+2
| | | | | | | | | | | | | | | | | | | | | Propagate its definition into all users. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Remove gen_op_st_T0_A0Richard Henderson2014-01-071-43/+40
| | | | | | | | | | | | | | | | | | | | | Propagate its definition into all users. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | target-i386: Introduce gen_op_st_rm_T0_A0Richard Henderson2014-01-071-61/+24
| | | | | | | | | | | | | | | | | | | | | | | | Too many places have the same test vs OR_TMP0 to indicate a write back to memory. Hoist that to a subroutine. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
OpenPOWER on IntegriCloud