+ if (live_after_node) {
+ /* Problem: fst doesn't support 80bit modes (spills), only fstp does
+ * fist doesn't support 64bit mode, only fistp
+ * Solution:
+ * - stack not full: push value and fstp
+ * - stack full: fstp value and load again
+ * Note that we cannot test on mode_E, because floats might be 80bit ... */
+ ir_mode *const mode = get_ia32_ls_mode(n);
+ if (get_mode_size_bits(mode) > (mode_is_int(mode) ? 32 : 64)) {
+ if (x87_get_depth(state) < N_ia32_st_REGS) {
+ /* ok, we have a free register: push + fstp */
+ x87_create_fpush(state, n, op2_idx, val);
+ x87_pop(state);
+ x87_patch_insn(n, op_p);
+ } else {
+ /* stack full here: need fstp + load */
+ x87_pop(state);
+ x87_patch_insn(n, op_p);
+
+ ir_node *const block = get_nodes_block(n);
+ ir_graph *const irg = get_irn_irg(n);
+ ir_node *const nomem = get_irg_no_mem(irg);
+ ir_node *const vfld = new_bd_ia32_vfld(NULL, block, get_irn_n(n, 0), get_irn_n(n, 1), nomem, mode);
+
+ /* copy all attributes */
+ set_ia32_frame_ent(vfld, get_ia32_frame_ent(n));
+ if (is_ia32_use_frame(n))
+ set_ia32_use_frame(vfld);
+ set_ia32_op_type(vfld, ia32_AddrModeS);
+ add_ia32_am_offs_int(vfld, get_ia32_am_offs_int(n));
+ set_ia32_am_sc(vfld, get_ia32_am_sc(n));
+ set_ia32_ls_mode(vfld, mode);
+
+ ir_node *const rproj = new_r_Proj(vfld, mode, pn_ia32_vfld_res);
+ ir_node *const mproj = new_r_Proj(vfld, mode_M, pn_ia32_vfld_M);
+ ir_node *const mem = get_irn_Proj_for_mode(n, mode_M);
+
+ assert(mem && "Store memory not found");
+
+ arch_set_irn_register(rproj, op2);
+
+ /* reroute all former users of the store memory to the load memory */
+ edges_reroute(mem, mproj);
+ /* set the memory input of the load to the store memory */
+ set_irn_n(vfld, n_ia32_vfld_mem, mem);
+
+ sched_add_after(n, vfld);
+ sched_add_after(vfld, rproj);
+
+ /* rewire all users, scheduled after the store, to the loaded value */
+ collect_and_rewire_users(n, val, rproj);
+
+ insn = NODE_ADDED;
+ }
+ } else {
+ /* we can only store the tos to memory */
+ if (op2_idx != 0)
+ x87_create_fxch(state, n, op2_idx);