Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.18
 
1.19
 
MAIN:ragge:20100919205515
 
local2.c
_>200200                 }
 201201 }
 202202 
<> 203+/*
  204+ * Compare two floating point numbers.
  205+ */
  206+static void
  207+fcomp(NODE *p)  
  208+{
  209+
  210+        if (p->n_left->n_op == REG) {
  211+                if (p->n_su & DORIGHT)
  212+                        expand(p, 0, "  fxch\n");
  213+                expand(p, 0, "  fucompp\n");    /* emit compare insn  */
  214+        } else
  215+                comperr("bad compare %p\n", p);
  216+        expand(p, 0, "  fnstsw %ax\n"); /* move status reg to ax */
  217+        
  218+        switch (p->n_op) {
  219+        case EQ:
  220+                expand(p, 0, "  andb $69,%ah\n  xorb $64,%ah\n  je LC\n");
  221+                break;
  222+        case NE:
  223+                expand(p, 0, "  andb $69,%ah\n  xorb $64,%ah\n  jne LC\n");
  224+                break;
  225+        case LE:
  226+                expand(p, 0, "  andb $69,%ah\n  xorb $1,%ah\n   jne LC\n");
  227+                break;
  228+        case LT:
  229+                expand(p, 0, "  andb $69,%ah\n  je LC\n");
  230+                break;
  231+        case GT:
  232+                expand(p, 0, "  andb $1,%ah\n   jne LC\n");
  233+                break;
  234+        case GE:
  235+                expand(p, 0, "  andb $69,%ah\n  jne LC\n");
  236+                break;
  237+        default:
  238+                comperr("fcomp op %d\n", p->n_op);
  239+        }
  240+}
  241+
  242+
203243 #if 0
 204244 /*
 205245  * Emit code to compare two longlong numbers.
     
 !
409449                         starg(p);
 410450                 break;
 411451 #endif
<> 452+
  453+        case 'G': /* Floating point compare */
  454+                fcomp(p);
  455+                break;
  456+
<_412457         case 'j': /* convert unsigned long to f/d */
 413458                 ultofd(p);
 414459                 break;
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-08-30 04:10 +0200