On 05/16/2017 02:28 AM, Thomas Huth wrote:
+void HELPER(testblock)(CPUS390XState *env, uint64_t addr)
+{
+    CPUState *cs = CPU(s390_env_get_cpu(env));
+    int i;
+
+    addr = get_address(env, 0, 0, addr) & ~0xfffULL;
+    for (i = 0; i < TARGET_PAGE_SIZE; i += 8) {
+        stq_phys(cs->as, addr + i, 0);
+    }
+    env->cc_op = 0;
+}

This needs several changes: check that the physical page does indeed exist, "low address protection", return the cc code.

+DEF_HELPER_2(testblock, void, env, i64)

With cc returned, this becomes

  DEF_HELPER_FLAGS_2(testblock, TCG_CALL_NO_RWG, i32, env, i64)


r~

Reply via email to