NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/38956



On Jun 24,  2:08am, tsutsui%ceres.dti.ne.jp@localhost (Izumi Tsutsui) wrote:
-- Subject: Re: kern/38956

| rosenfeld%grumpf.hope-2000.org@localhost wrote:
| 
| >  I tried the proposed fix for m68k and it seems to work for vax, too.
| 
| Hmm, interesting. On m68k with -fgcse, the following code
| in rb_tree_insert_node() around line 1298 is compiled badly:
| ---
|       /*
|        * Initialize the node and insert as a leaf into the tree.
|        */
|       self->rb_parent = parent;
|       self->rb_position = position;
|       RB_MARK_MOVED(self);
| ---
|  830: 142b 000c       moveb %a3@(12),%d2      # d2 = self->rb_info
|  834: 2748 0008       movel %a0,%a3@(8)       # self->rb_parent = parent
|  838: efeb 3001 000c  bfins %d3,%a3@(12),0,1  # self->rb_position = position
|  83e: 1602            moveb %d2,%d3           # d3 = d2
|  840: 0003 0008       orib #8,%d3             # RB_MARK_MOVED(d3)
|  844: 1743 000c       moveb %d3,%a3@(12)      # rb_position is lost here
| ---
| 
| With -fno-gcse (or -fno-gcse-lm):
| ---
|  82a: 2748 0008       movel %a0,%a3@(8)       # self->rb_parent = parent
|  82e: efeb 2001 000c  bfins %d2,%a3@(12),0,1  # self->rb_posision = position
|  834: 142b 000c       moveb %a3@(12),%d2      # d2 = self->rb_info
|  838: 1602            moveb %d2,%d3           # d3 = d2
|  83a: 0003 0008       orib #8,%d3             # RB_MARK_MOVED(d3)
|  83e: 1743 000c       moveb %d3,%a3@(12)      # self->rb_info = d3
| ---
| 
| I'm not sure if this is MI gcc issue or not.

I bet if we stop using bitfields and use explicit & and | things are going
to be working fine.

christos


Home | Main Index | Thread Index | Old Index