BSD 4 release
[unix-history] / usr / src / cmd / as / asjxxx.c
index ab12699..a1ea143 100644 (file)
@@ -1,17 +1,24 @@
-/* Copyright (c) 1979 Regents of the University of California */
+/* Copyright (c) 1980 Regents of the University of California */
+static char sccsid[] = "@(#)asjxxx.c 4.5 8/20/80";
 #include       <stdio.h>
 #include       "as.h"
 #include       "assyms.h"
 
 #include       <stdio.h>
 #include       "as.h"
 #include       "assyms.h"
 
-#define JBR 0x11
-#define BRW 0x31
+#define        JBR     0x11
+#define        BRW     0x31
+#define        JMP     0x17
 
 /*
  *     The number of bytes to add if the jxxx must be "exploded"
  *     into the long form
  */
 
 /*
  *     The number of bytes to add if the jxxx must be "exploded"
  *     into the long form
  */
-#define        JBRFSIZE        1       /*goes to brw*/
-#define JXXXFSIZE      3       /*goes to brb, brw <byte> <byte> */
+#define        JBRDELTA        1       /* brb <byte> ==> brw <byte> <byte> */
+#define        JXXXDELTA       3       /* brb <byte> ==> brb <byte> brw <byte> <byte> */
+#define        JBRJDELTA       d124    /* brb <byte> ==> jmp L^(pc) <byte>*d124 */
+#define        JXXXJDELTA      d124+2  /* brb <byte> ==> brb <byte> jmp L^(pc) <byte>*d124 */
+
+int    jbrfsize = JBRDELTA;
+int    jxxxfsize = JXXXDELTA;
 
 /*
  *     These variables are filled by asscan.c with the
 
 /*
  *     These variables are filled by asscan.c with the
 struct         symtab  *lastnam;
 struct symtab  *lastjxxx;
 
 struct         symtab  *lastnam;
 struct symtab  *lastjxxx;
 
+initijxxx()
+{
+       jbrfsize = jxxxJUMP ? JBRJDELTA : JBRDELTA;
+       jxxxfsize = jxxxJUMP ? JXXXJDELTA : JXXXDELTA;
+       /*
+        *      Note: ifjxxxJUMP is set, then we do NOT do any tunnelling;
+        *      this was too complicated to figure out, and in the first
+        *      version of the assembler, tunnelling proved to be the hardest
+        *      to get to work!
+        */
+}
 /*
  *     Handle jxxx instructions
  */
 /*
  *     Handle jxxx instructions
  */
@@ -40,26 +58,23 @@ ijxout(op,ap,nact)
                 */
                putins(op,ap,nact); 
                jumpfrom = lastjxxx;
                 */
                putins(op,ap,nact); 
                jumpfrom = lastjxxx;
-               jumpfrom->tag = JXACTIVE;
-               jumpfrom->jxbump = 0;
+               jumpfrom->s_tag = JXACTIVE;
+               jumpfrom->s_jxbump = 0;
                if (op == JBR)
                if (op == JBR)
-                       jumpfrom->jxfear = JBRFSIZE;
+                       jumpfrom->s_jxfear = jbrfsize;
                else
                else
-                       jumpfrom->jxfear = JXXXFSIZE;
-#ifdef DJXXX
-               jumpfrom->jxline = lineno;
-#endif
+                       jumpfrom->s_jxfear = jxxxfsize;
                if (lastnam == 0)
                        yyerror("jxxx destination not a label");
                if (lastnam == 0)
                        yyerror("jxxx destination not a label");
-               jumpfrom->dest = lastnam;
-               jumpfrom->type = dotp->xtype;   /*only TEXT or DATA*/
-               jumpfrom->index = dotp-usedot;
+               jumpfrom->s_dest = lastnam;
+               jumpfrom->s_type = dotp->e_xtype;       /*only TEXT or DATA*/
+               jumpfrom->s_index = dotp-usedot;
                /*
                 *      value ALWAYS (ALWAYS!!!) indexes the next instruction
                 *      after the jump, even in the jump must be exploded
                 *      (bumped)
                 */
                /*
                 *      value ALWAYS (ALWAYS!!!) indexes the next instruction
                 *      after the jump, even in the jump must be exploded
                 *      (bumped)
                 */
-               jumpfrom->value = dotp->xvalue;
+               jumpfrom->s_value = dotp->e_xvalue;
                njxxx++;
        } else {/* pass2, resolve */
                /*
                njxxx++;
        } else {/* pass2, resolve */
                /*
@@ -71,27 +86,27 @@ ijxout(op,ap,nact)
                register struct arg     *aplast;
 
                aplast = ap + nact - 1;
                register struct arg     *aplast;
 
                aplast = ap + nact - 1;
-               xp = aplast->xp;
-               if (lastjxxx->tag == JXTUNNEL){
-                       lastjxxx->tag = JXINACTIVE;
-                       tunnel = lastjxxx->dest;
-                       xp->xvalue = tunnel->value      /*index of instruction following*/
+               xp = aplast->a_xp;
+               if (lastjxxx->s_tag == JXTUNNEL){
+                       lastjxxx->s_tag = JXINACTIVE;
+                       tunnel = lastjxxx->s_dest;
+                       xp->e_xvalue = tunnel->s_value  /*index of instruction following*/
                                    - 3                 /* size of brw + word*/
                                    - 3                 /* size of brw + word*/
-                                   + ( ( (tunnel->jxfear == JBRFSIZE) &&
-                                         (tunnel->jxbump == 0))?1:0);
+                                   + ( ( (tunnel->s_jxfear == jbrfsize) &&
+                                         (tunnel->s_jxbump == 0))?1:0);
                                                        /*non bumped branch byteis only 2 back*/
                }
                                                        /*non bumped branch byteis only 2 back*/
                }
-               if (lastjxxx->jxbump == 0){     /*wasn't bumped, so is short form*/
+               if (lastjxxx->s_jxbump == 0){   /*wasn't bumped, so is short form*/
                        putins(op, ap, nact);
                } else {
                        if (op != JBR){ /*branch reverse conditional byte over 
                                          branch unconditional word*/
                        putins(op, ap, nact);
                } else {
                        if (op != JBR){ /*branch reverse conditional byte over 
                                          branch unconditional word*/
-                               oxvalue = xp->xvalue;
-                               xp->xvalue = lastjxxx->value;
+                               oxvalue = xp->e_xvalue;
+                               xp->e_xvalue = lastjxxx->s_value;
                                putins(op^1, ap, nact);
                                putins(op^1, ap, nact);
-                               xp->xvalue = oxvalue;
+                               xp->e_xvalue = oxvalue;
                        }
                        }
-                       putins(BRW, aplast, 1);
+                       putins(jxxxJUMP ? JMP : BRW, aplast, 1);
                }
        }
 }      /*end of ijxout*/
                }
        }
 }      /*end of ijxout*/
@@ -101,19 +116,46 @@ jalign(xp, sp)
        register struct symtab *sp;
 {
        register        int     mask;
        register struct symtab *sp;
 {
        register        int     mask;
-       if (xp->xtype != XABS || xp->xvalue < 0 || xp->xvalue > 16) {
+       /*
+        *      Problem with .align
+        *
+        *      When the loader constructs an executable file from
+        *      a number of objects, it effectively concatnates
+        *      together all of the text segments from all objects,
+        *      and then all of the data segments.
+        *
+        *      If we do an align by a large value, we can align
+        *      within the a.out this assembly produces, but
+        *      after the loader concatnates, the alignment can't
+        *      be guaranteed if the objects preceding this one
+        *      in the load are also aligned to the same size.
+        *
+        *      Currently, the loader guarantees full word alignment.
+        *      So, ridiculous aligns are caught here and converted
+        *      to a .align 2, if possible.
+        */
+       if (   (xp->e_xtype != XABS)
+           || (xp->e_xvalue < 0)
+           || (xp->e_xvalue > 16)
+           ) {
                yyerror("Illegal `align' argument");
                return;
        }
                yyerror("Illegal `align' argument");
                return;
        }
+       if (xp->e_xvalue > 2){
+               if (passno == 1){
+                 yywarning(".align %d in any segment is NOT preserved by the loader",
+                       xp->e_xvalue);
+                 yywarning(".align %d converted to .align 2",
+                       xp->e_xvalue);
+               }
+               xp->e_xvalue = 2;
+       }
        flushfield(NBPW/4);
        if (passno == 1) {
        flushfield(NBPW/4);
        if (passno == 1) {
-               sp->tag = JXALIGN;
-               sp->jxfear = (1 << xp->xvalue) - 1;
-#ifdef DJXXX
-               sp->jxline = lineno;
-#endif
-               sp->type = dotp->xtype;
-               sp->index = dotp-usedot;
+               sp->s_tag = JXALIGN;
+               sp->s_jxfear = (1 << xp->e_xvalue) - 1;
+               sp->s_type = dotp->e_xtype;
+               sp->s_index = dotp-usedot;
                /*
                 *      We guess that the align will take up at least one
                 *      byte in the code output.  We will correct for this
                /*
                 *      We guess that the align will take up at least one
                 *      byte in the code output.  We will correct for this
@@ -127,13 +169,20 @@ jalign(xp, sp)
                 *      the code stream point to the next byte following
                 *      the logical entry in the symbol table
                 */
                 *      the code stream point to the next byte following
                 *      the logical entry in the symbol table
                 */
-               dotp->xvalue += 1;
-               sp->value = dotp->xvalue;
+               dotp->e_xvalue += 1;
+               sp->s_value = dotp->e_xvalue;
                njxxx++;
        } else {
                njxxx++;
        } else {
-               mask = (1 << xp->xvalue) - 1;
-               while (dotp->xvalue & mask){
+               mask = (1 << xp->e_xvalue) - 1;
+               while (dotp->e_xvalue & mask){
+#ifdef UNIX
                        outb(0);
                        outb(0);
+#endif UNIX
+#ifdef VMS
+                       *vms_obj_ptr++ = -1;
+                       *vms_obj_ptr++ = 0;
+                       dotp->e_xvalue += 1;
+#endif VMS
                }
        }
 }
                }
        }
 }
@@ -186,26 +235,26 @@ jxxxfix()
                 */
                tunnel = 0;     /*initially, no tunnel*/
                SEGITERATE(segno, 0, 0, cojumpfrom, jumpfrom, ubjumpfrom, ++){
                 */
                tunnel = 0;     /*initially, no tunnel*/
                SEGITERATE(segno, 0, 0, cojumpfrom, jumpfrom, ubjumpfrom, ++){
-                       tag = jumpfrom->tag;
+                       tag = jumpfrom->s_tag;
                        if (tag <= IGNOREBOUND)
                                continue;       /*just an ordinary symbol*/
                        if (tag == JXALIGN){
                                tunnel = 0;     /*avoid tunneling across a flex alocation*/
                                continue;       /*we take care of these later*/
                        }
                        if (tag <= IGNOREBOUND)
                                continue;       /*just an ordinary symbol*/
                        if (tag == JXALIGN){
                                tunnel = 0;     /*avoid tunneling across a flex alocation*/
                                continue;       /*we take care of these later*/
                        }
-                       if (   jumpfrom->jxfear == JBRFSIZE     /*unconditional*/
+                       if (   jumpfrom->s_jxfear == jbrfsize   /*unconditional*/
                            || (   tag == JXINACTIVE            /*inactive bumped*/
                            || (   tag == JXINACTIVE            /*inactive bumped*/
-                               && (jumpfrom->jxbump != 0)
+                               && (jumpfrom->s_jxbump != 0)
                               )
                           ) tunnel = jumpfrom;
                        if (tag != JXACTIVE)
                                continue;
                               )
                           ) tunnel = jumpfrom;
                        if (tag != JXACTIVE)
                                continue;
-                       dest = jumpfrom->dest;
-                       if (jumpfrom->index != dest->index){
+                       dest = jumpfrom->s_dest;
+                       if (jumpfrom->s_index != dest->s_index){
                                yyerror("Intersegment jxxx");
                                continue;
                        }
                                yyerror("Intersegment jxxx");
                                continue;
                        }
-                       displ = dest->value - jumpfrom->value;
+                       displ = dest->s_value - jumpfrom->s_value;
                        if (displ < MINBYTE || displ > MAXBYTE) {
                                /*
                                 *      This is an immediate lose!
                        if (displ < MINBYTE || displ > MAXBYTE) {
                                /*
                                 *      This is an immediate lose!
@@ -218,31 +267,31 @@ jxxxfix()
                                 *      to the tunnel is less than zero, and
                                 *      its relative position will be unaffected
                                 *      by future jxxx expansions.
                                 *      to the tunnel is less than zero, and
                                 *      its relative position will be unaffected
                                 *      by future jxxx expansions.
+                                *
+                                *      No tunnels if doing jumps...
                                 */
                                 */
-                               if (    (jumpfrom->jxfear > JBRFSIZE)
+                               if (    (!jxxxJUMP)
+                                    && (jumpfrom->s_jxfear > jbrfsize)
                                     && (tunnel) 
                                     && (tunnel) 
-                                    && (tunnel->dest == jumpfrom->dest)        
-                                    && (tunnel->index == jumpfrom->index)
-                                    && (tunnel->value - jumpfrom->value >=
-                                               MINBYTE + JXXXFSIZE)
+                                    && (tunnel->s_dest == jumpfrom->s_dest)    
+                                    && (tunnel->s_index == jumpfrom->s_index)
+                                    && (tunnel->s_value - jumpfrom->s_value >=
+                                               MINBYTE + jxxxfsize)
                                   ) {
                                                /*
                                                 *      tunnelling is OK
                                                 */
                                   ) {
                                                /*
                                                 *      tunnelling is OK
                                                 */
-                                               jumpfrom->dest = tunnel;
+                                               jumpfrom->s_dest = tunnel;
                                                /*
                                                 * no bumping needed, this
                                                 * is now effectively inactive
                                                 * but must be remembered
                                                 */
                                                /*
                                                 * no bumping needed, this
                                                 * is now effectively inactive
                                                 * but must be remembered
                                                 */
-                                               jumpfrom->tag = JXTUNNEL;
+                                               jumpfrom->s_tag = JXTUNNEL;
 #ifdef DEBUG
                                                if(debug)
                                                printf("Tunnel from %s from line %d\n",
 #ifdef DEBUG
                                                if(debug)
                                                printf("Tunnel from %s from line %d\n",
-                                                       jumpfrom->name, lineno);
-#endif
-#ifdef METRIC
-                                               jxxxtunnel++;
+                                                       jumpfrom->s_name, lineno);
 #endif
                                                continue;
                                } else {        /*tunneling not possible*/
 #endif
                                                continue;
                                } else {        /*tunneling not possible*/
@@ -253,7 +302,7 @@ jxxxfix()
                                         *      as a tunnel
                                         */
                                        tunnel = jumpfrom;
                                         *      as a tunnel
                                         */
                                        tunnel = jumpfrom;
-                                       jumpfrom->tag = JXNOTYET;
+                                       jumpfrom->s_tag = JXNOTYET;
                                        ++nchange;
                                        continue;
                                }
                                        ++nchange;
                                        continue;
                                }
@@ -264,19 +313,19 @@ jxxxfix()
                        if (displ >= 0) {
                                SEGITERATE(segno, cojumpfrom + 1,0,cointdest,
                                                intdest, ubintdest, ++){
                        if (displ >= 0) {
                                SEGITERATE(segno, cojumpfrom + 1,0,cointdest,
                                                intdest, ubintdest, ++){
-                                       if (intdest->value > dest->value) 
+                                       if (intdest->s_value > dest->s_value) 
                                                break; /* beyond destination */
                                                break; /* beyond destination */
-                                       if (intdest->tag <= JXQUESTIONABLE)
+                                       if (intdest->s_tag <= JXQUESTIONABLE)
                                                continue;       /*frozen solid*/
                                                continue;       /*frozen solid*/
-                                       if (intdest->tag == JXALIGN){
-                                               jumpfrom->jxoveralign = 1;
+                                       if (intdest->s_tag == JXALIGN){
+                                               jumpfrom->s_jxoveralign = 1;
                                                badjxalign++;
                                        }
                                        /*
                                         *      we assume the worst case
                                         *      for unfrozen jxxxxes
                                         */
                                                badjxalign++;
                                        }
                                        /*
                                         *      we assume the worst case
                                         *      for unfrozen jxxxxes
                                         */
-                                       displ += intdest->jxfear;
+                                       displ += intdest->s_jxfear;
                                }
                                if (displ <= MAXBYTE){
                                        /*
                                }
                                if (displ <= MAXBYTE){
                                        /*
@@ -284,7 +333,7 @@ jxxxfix()
                                         *      can't hurt us, so forget about
                                         *      this jump
                                         */
                                         *      can't hurt us, so forget about
                                         *      this jump
                                         */
-                                       jumpfrom->tag = JXINACTIVE;
+                                       jumpfrom->s_tag = JXINACTIVE;
                                } else {
                                        stillactives++;
                                }
                                } else {
                                        stillactives++;
                                }
@@ -294,18 +343,18 @@ jxxxfix()
                         */
                                SEGITERATE(segno, cojumpfrom - 1,1,cointdest,
                                  intdest, ubintdest, --){
                         */
                                SEGITERATE(segno, cojumpfrom - 1,1,cointdest,
                                  intdest, ubintdest, --){
-                                       if (intdest->value <= dest->value) 
+                                       if (intdest->s_value <= dest->s_value) 
                                                break; /* beyond destination */
                                                break; /* beyond destination */
-                                       if (intdest->tag <= JXQUESTIONABLE)
+                                       if (intdest->s_tag <= JXQUESTIONABLE)
                                                continue;       /*frozen solid*/
                                                continue;       /*frozen solid*/
-                                       if (intdest->tag == JXALIGN){
-                                               jumpfrom->jxoveralign = 1;
+                                       if (intdest->s_tag == JXALIGN){
+                                               jumpfrom->s_jxoveralign = 1;
                                                badjxalign++;
                                        }
                                                badjxalign++;
                                        }
-                                       displ -= intdest->jxfear; 
+                                       displ -= intdest->s_jxfear; 
                                }
                                if (displ >= MINBYTE) {
                                }
                                if (displ >= MINBYTE) {
-                                       jumpfrom->tag = JXINACTIVE;
+                                       jumpfrom->s_tag = JXINACTIVE;
                                } else {
                                        stillactives++;
                                }
                                } else {
                                        stillactives++;
                                }
@@ -332,21 +381,15 @@ jxxxfix()
                         *      functions.
                         */
                        if (stillactives){
                         *      functions.
                         */
                        if (stillactives){
-#ifdef METRIC
-                               jxdeadlock++;
-#endif
                                SEGITERATE(segno, 0, 0, cojumpfrom, jumpfrom,
                                    ubjumpfrom, ++){
                                SEGITERATE(segno, 0, 0, cojumpfrom, jumpfrom,
                                    ubjumpfrom, ++){
-                                       if (jumpfrom->tag == JXACTIVE){
-                                               jumpfrom->tag =
+                                       if (jumpfrom->s_tag == JXACTIVE){
+                                               jumpfrom->s_tag =
                                                  badjxalign?JXNOTYET:JXINACTIVE;
                                        }
                                }
                                if (badjxalign){
                                                  badjxalign?JXNOTYET:JXINACTIVE;
                                        }
                                }
                                if (badjxalign){
-                                       jxxxbump(segno, 0);
-#ifdef METRIC
-                                       nbadjxsegs++;
-#endif
+                                       jxxxbump(segno, (struct symtab **)0);
                                }
                        }
                        /*
                                }
                        }
                        /*
@@ -354,35 +397,35 @@ jxxxfix()
                         */
                        SEGITERATE(segno, 0, 0, cojumpfrom, jumpfrom,
                           ubjumpfrom, ++){
                         */
                        SEGITERATE(segno, 0, 0, cojumpfrom, jumpfrom,
                           ubjumpfrom, ++){
-                           if (jumpfrom->tag == JXALIGN){
+                           if (jumpfrom->s_tag == JXALIGN){
                                /*
                                 *      Predict the true displacement
                                 *      needed, irregardless of the
                                 *      fact that we guessed 1
                                 */
                                /*
                                 *      Predict the true displacement
                                 *      needed, irregardless of the
                                 *      fact that we guessed 1
                                 */
-                               displ = (jumpfrom->value - 1) & (unsigned)jumpfrom->jxfear;
+                               displ = (jumpfrom->s_value - 1) & (unsigned)jumpfrom->s_jxfear;
                                if (displ == 0){        /*no virtual displacement*/
                                if (displ == 0){        /*no virtual displacement*/
-                                       jumpfrom->jxfear = -1;
+                                       jumpfrom->s_jxfear = -1;
                                } else {
                                } else {
-                                       jumpfrom->jxfear = (jumpfrom->jxfear + 1) - displ;
+                                       jumpfrom->s_jxfear = (jumpfrom->s_jxfear + 1) - displ;
                                        /*
                                        /*
-                                        *      assert jumpfrom->jxfear > 0
+                                        *      assert jumpfrom->s_jxfear > 0
                                         */
                                         */
-                                       if (jumpfrom->jxfear == 1){
+                                       if (jumpfrom->s_jxfear == 1){
                                                /*our prediction was correct*/
                                                continue;
                                        }
                                        /*
                                                /*our prediction was correct*/
                                                continue;
                                        }
                                        /*
-                                        *      assert jumpfrom->jxfear > 1
+                                        *      assert jumpfrom->s_jxfear > 1
                                         */
                                         */
-                                       jumpfrom->jxfear -= 1;  /*correct guess*/
+                                       jumpfrom->s_jxfear -= 1;        /*correct guess*/
                                }
                                /*
                                }
                                /*
-                                *      assert jumpfrom->jxfear = -1, +1...2**n-1
+                                *      assert jumpfrom->s_jxfear = -1, +1...2**n-1
                                 */
                                 */
-                               jumpfrom->tag = JXNOTYET;       /*signal*/
+                               jumpfrom->s_tag = JXNOTYET;     /*signal*/
                                jxxxbump(segno, cojumpfrom);
                                jxxxbump(segno, cojumpfrom);
-                               jumpfrom->tag = JXINACTIVE;
+                               jumpfrom->s_tag = JXINACTIVE;
                                /*
                                 *      Assert jxfrom->jxvalue indexes the first
                                 *      code byte after the added bytes, and
                                /*
                                 *      Assert jxfrom->jxvalue indexes the first
                                 *      code byte after the added bytes, and
@@ -392,7 +435,7 @@ jxxxfix()
                        }       /*end of walking through each segment*/
                }       /*end of no changes */
                else {  /*changes, and still have to try another pass*/
                        }       /*end of walking through each segment*/
                }       /*end of no changes */
                else {  /*changes, and still have to try another pass*/
-                       jxxxbump(segno, 0);
+                       jxxxbump(segno, (struct symtab **)0);
                }
           }    /*end of doing the topologic sort*/
        }       /*end of iterating through all segments*/
                }
           }    /*end of doing the topologic sort*/
        }       /*end of iterating through all segments*/
@@ -415,25 +458,22 @@ jxxxbump(segno, starthint)
        register        int     cum_bump;
        register        unsigned        char    tag;
 
        register        int     cum_bump;
        register        unsigned        char    tag;
 
-#ifdef METRIC
-       jxxxiterate++;
-#endif
        cum_bump = 0;
        SEGITERATE(segno, starthint, 0, cosp, sp, ub, ++){
        cum_bump = 0;
        SEGITERATE(segno, starthint, 0, cosp, sp, ub, ++){
-               tag = sp->tag;
+               tag = sp->s_tag;
                if (tag == JXNOTYET){
 #ifdef DEBUG
                        if (debug){
                if (tag == JXNOTYET){
 #ifdef DEBUG
                        if (debug){
-                       if (sp->dest != 0)
+                       if (sp->s_dest != 0)
                                printf("Explode jump to %s on line %d\n",
                                printf("Explode jump to %s on line %d\n",
-                                       sp->dest->name, lineno);
+                                       sp->s_dest->s_name, lineno);
                        else
                                printf("Explode an align!\n");
                        }
 #endif
                        else
                                printf("Explode an align!\n");
                        }
 #endif
-                       sp->tag = JXINACTIVE;
-                       sp->jxbump = 1;
-                       cum_bump += sp->jxfear;
+                       sp->s_tag = JXINACTIVE;
+                       sp->s_jxbump = 1;
+                       cum_bump += sp->s_jxfear;
                }
                /*
                 *      Only bump labels and jxxxes. Ignored entries can
                }
                /*
                 *      Only bump labels and jxxxes. Ignored entries can
@@ -442,7 +482,7 @@ jxxxbump(segno, starthint)
                 *      pass.
                 */
                if (tag >= OKTOBUMP)    /*only bump labels and jxxxes and floating stabs*/
                 *      pass.
                 */
                if (tag >= OKTOBUMP)    /*only bump labels and jxxxes and floating stabs*/
-                       sp->value += cum_bump;
+                       sp->s_value += cum_bump;
        }
        }
-       usedot[segno].xvalue += cum_bump;
+       usedot[segno].e_xvalue += cum_bump;
 }
 }