Commit 0275e6b6 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180515' into staging



target-arm queue:
 * Fix coverity nit in int_to_float code
 * Don't set Invalid for float-to-int(MAXINT)
 * Fix fp_status_f16 tininess before rounding
 * Add various missing insns from the v8.2-FP16 extension
 * Fix sqrt_f16 exception raising
 * sdcard: Correct CRC16 offset in sd_function_switch()
 * tcg: Optionally log FPU state in TCG -d cpu logging

# gpg: Signature made Tue 15 May 2018 15:06:09 BST
# gpg:                using RSA key 3C2525ED14360CDE
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>"
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>"
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20180515:
  tcg: Optionally log FPU state in TCG -d cpu logging
  sdcard: Correct CRC16 offset in sd_function_switch()
  target/arm: Fix sqrt_f16 exception raising
  target/arm: Implement FMOV (immediate) for fp16
  target/arm: Implement FCSEL for fp16
  target/arm: Implement FCMP for fp16
  target/arm: Implement FP data-processing (3 source) for fp16
  target/arm: Implement FP data-processing (2 source) for fp16
  target/arm: Introduce and use read_fp_hreg
  target/arm: Implement FCVT (scalar, fixed-point) for fp16
  target/arm: Implement FCVT (scalar, integer) for fp16
  target/arm: Early exit after unallocated_encoding in disas_fp_int_conv
  target/arm: Implement FMOV (general) for fp16
  target/arm: Fix fp_status_f16 tininess before rounding
  fpu/softfloat: Don't set Invalid for float-to-int(MAXINT)
  fpu/softfloat: int_to_float ensure r fully initialised

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents ad1b4ec3 ae765180
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -156,11 +156,14 @@ static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, TranslationBlock *itb)
    if (qemu_loglevel_mask(CPU_LOG_TB_CPU)
        && qemu_log_in_addr_range(itb->pc)) {
        qemu_log_lock();
        int flags = 0;
        if (qemu_loglevel_mask(CPU_LOG_TB_FPU)) {
            flags |= CPU_DUMP_FPU;
        }
#if defined(TARGET_I386)
        log_cpu_state(cpu, CPU_DUMP_CCOP);
#else
        log_cpu_state(cpu, 0);
        flags |= CPU_DUMP_CCOP;
#endif
        log_cpu_state(cpu, flags);
        qemu_log_unlock();
    }
#endif /* DEBUG_DISAS */
+3 −3
Original line number Diff line number Diff line
@@ -1368,14 +1368,14 @@ static int64_t round_to_int_and_pack(FloatParts in, int rmode,
            r = UINT64_MAX;
        }
        if (p.sign) {
            if (r < -(uint64_t) min) {
            if (r <= -(uint64_t) min) {
                return -r;
            } else {
                s->float_exception_flags = orig_flags | float_flag_invalid;
                return min;
            }
        } else {
            if (r < max) {
            if (r <= max) {
                return r;
            } else {
                s->float_exception_flags = orig_flags | float_flag_invalid;
@@ -1525,7 +1525,7 @@ FLOAT_TO_UINT(64, 64)

static FloatParts int_to_float(int64_t a, float_status *status)
{
    FloatParts r;
    FloatParts r = {};
    if (a == 0) {
        r.cls = float_class_zero;
        r.sign = false;
+1 −1
Original line number Diff line number Diff line
@@ -787,7 +787,7 @@ static void sd_function_switch(SDState *sd, uint32_t arg)
        sd->data[14 + (i >> 1)] = new_func << ((i * 4) & 4);
    }
    memset(&sd->data[17], 0, 47);
    stw_be_p(sd->data + 65, sd_crc16(sd->data, 64));
    stw_be_p(sd->data + 64, sd_crc16(sd->data, 64));
}

static inline bool sd_wp_addr(SDState *sd, uint64_t addr)
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ static inline bool qemu_log_separate(void)
#define CPU_LOG_PAGE       (1 << 14)
/* LOG_TRACE (1 << 15) is defined in log-for-trace.h */
#define CPU_LOG_TB_OP_IND  (1 << 16)
#define CPU_LOG_TB_FPU     (1 << 17)

/* Lock output for a series of related logs.  Since this is not needed
 * for a single qemu_log / qemu_log_mask / qemu_log_mask_and_addr, we
+2 −0
Original line number Diff line number Diff line
@@ -324,6 +324,8 @@ static void arm_cpu_reset(CPUState *s)
                              &env->vfp.fp_status);
    set_float_detect_tininess(float_tininess_before_rounding,
                              &env->vfp.standard_fp_status);
    set_float_detect_tininess(float_tininess_before_rounding,
                              &env->vfp.fp_status_f16);
#ifndef CONFIG_USER_ONLY
    if (kvm_enabled()) {
        kvm_arm_reset_vcpu(cpu);
Loading