Sunny Cove wide

By: Travis Downs (, December 16, 2018 8:19 am
Room: Moderated Discussions
anon ( on December 15, 2018 9:55 am wrote:
> Travis Downs ( on December 15, 2018 9:08 am wrote:
> > anon ( on December 14, 2018 2:57 am wrote:
> > > Travis Downs ( on December 13, 2018 4:36 pm wrote:
> > > > anon ( on December 13, 2018 3:51 pm wrote:
> > > > >
> > > > > We're talking about x86, you can't have multiple flags so no
> > > > > matter how it's handled there's only one possible source.
> > > > >
> > > >
> > > > In the in-order part sure, but executing out of order of course there can be many different flag values
> > > > in flight at once. So flags have to be renamed just like registers or else out-of-order doesn't work.
> > > >
> > > > As far as I know the renamer associates writes of the flags to the same phys register as the destination
> > > > of the flag-writing instruction (and this means that something like test or cmp which doesn't have
> > > > a destination register still gets a renamed physical register, just for the flags). Every flag
> > > > consuming instruction then gets a reference to the last written flag register.
> > > >
> > > > That's at least what Intel describes in their patents: other variants are possible
> > > > but it appears to work reasonably close to this based on experimentation.
> > > >
> > >
> > > The point is that renaming works differently for flags.
> > > There aren't multiple flags to choose from. It's always the most recent one.
> >
> > Well there are multiple flags and instructions write different subsets of them, but sure it's
> > not exactly the same as register renaming because it's a somewhat more restricted problem
> > in that sense (although multiple flags can be written which is not true for registers).
> >
> Like I said partial register problems don't apply due to the macro fusion restrictions.
> > In any case, let's assume for the sake of argument that flag renaming is much simpler at the hardware
> > level (as I mentioned twice already I think it basically piggy-backs on the destination register
> > renaming). The original claim was that flag renaming doesn't occur and so test/jcc-type fusion was
> > therefore easier. I think we agree that flag renaming does occur, but that perhaps it is "easy",
> > so how does that relate to the original discussion? What does it say about fusing mov/op?
> >
> I'm not sure how you managed to interpret "there is only one most recent SR" as "there is no renaming".
> If there was only one SR the qualifier "most recent" would be redundant.

I was referring to this:

> Implicit operands like
> flags and with push/pop are dealt with in the frontend iirc so all the information is available.

I thought it meant "flags are not renamed" since they are handled entirely in the front-end which is how we started this long digression. If you believe that flags are renamed, but that this is simpler in hardware than general purpose register renaming, then we probably agree.

As before, I don't think the discussion of whether flags are renamed is even relevant to macro-fusion.

> And they are handled as always because the jump doesn't produce a result.
> This is about the result that is passed between the fused instructions.
> You must be able to recognize that there's a difference between passing SR results and GPR results.

Finally I think I understand the disconnect and why you keep talking about the renamer and "overwriting" registers and now passing results between the fused instructions.

As I understand now you see macro-fusion as still leaving the two component ops somehow intact although "fused together", so that the renamer, for example, still needs to handle the complexity of a mov followed by an op and that's how we started discussed this.

That is, that the result of macro-fusion is similar in a way to the result of micro-fusion: where both uops still exist, but are fused together for some (perhaps all) of the pipeline.

Seen in that context, this whole discussion makes sense.

However, I don't think that's how macro-fusion works at all. In my understanding, a single uop pops out of decoding, and from there on it looks exactly like any other single uop that could have originated from a single instruction. I.e., there is no trace of the "fusedness" of the instruction (except to the extent that the produced op obviously doesn't come from an ISA-visible instruction).

Seen in that light maybe what I'm saying is clearer: the decoder takes the mov-op pair and emits a single lea-like op for the rest of the pipeline, which doesn't retain any trace of its fused nature. There is no renaming problem because it looks like any other instruction with 2 inputs and 1 output.

Maybe we are on the same page now?
< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
Sunny Cove wideSeni2018/12/12 01:58 PM
  Sunny Cove wideTravis Downs2018/12/12 08:25 PM
    Sunny Cove wideJeff S.2018/12/12 09:26 PM
      Sunny Cove wideTravis Downs2018/12/13 07:42 AM
        Sunny Cove wideanon2018/12/13 08:09 AM
          Sunny Cove wideTravis Downs2018/12/13 08:30 AM
            Sunny Cove wideJeff S.2018/12/13 08:40 AM
              Sunny Cove wideTravis Downs2018/12/13 08:55 AM
                Sunny Cove wideJeff S.2018/12/13 11:41 AM
                  Sunny Cove wideTravis Downs2018/12/13 01:03 PM
                  Non-power-of-two set sizesPaul A. Clayton2018/12/15 06:30 PM
        Sunny Cove wideJeff S.2018/12/13 08:33 AM
          Sunny Cove wideTravis Downs2018/12/13 08:50 AM
          What is "u-tagged"?G Adair2018/12/13 08:54 PM
            What is "u-tagged"?Travis Downs2018/12/13 10:22 PM
            What is "u-tagged"?Jeff S.2018/12/14 07:48 AM
              What is "u-tagged"?anon2018/12/14 07:51 PM
                What is "u-tagged"?Jeff S.2018/12/14 09:23 PM
                  What is "u-tagged"?anon2018/12/15 04:37 AM
                    What is "u-tagged"?anon2018/12/15 07:06 AM
                      What is "u-tagged"?Travis Downs2018/12/15 08:52 AM
                        What is "u-tagged"?anon2018/12/16 07:26 AM
                          What is "u-tagged"?Anon2018/12/18 03:25 AM
    Sunny Cove wideSeni2018/12/13 02:33 AM
      Sunny Cove wideKevin G2018/12/13 07:37 AM
        Sunny Cove wideTravis Downs2018/12/13 08:17 AM
          Sunny Cove wideKevin G2018/12/17 09:09 AM
            Sunny Cove wideTravis Downs2018/12/18 02:14 PM
              Sunny Cove wideKevin G2018/12/19 11:02 AM
      Sunny Cove wideTravis Downs2018/12/13 07:51 AM
        Sunny Cove wideMaynard Handley2018/12/13 10:25 AM
          Sunny Cove wideTravis Downs2018/12/13 11:23 AM
            Sunny Cove wideanon2018/12/13 01:01 PM
              Sunny Cove wideTravis Downs2018/12/13 01:22 PM
                Sunny Cove wideanon2018/12/13 03:51 PM
                  Sunny Cove wideTravis Downs2018/12/13 04:36 PM
                    Sunny Cove wideanon2018/12/14 02:57 AM
                      Sunny Cove wideLinus Torvalds2018/12/14 12:54 PM
                        Sunny Cove wideanon2018/12/14 03:25 PM
                          Sunny Cove wideLinus Torvalds2018/12/14 05:46 PM
                            Sunny Cove wideanon2018/12/15 01:57 AM
                              Sunny Cove wideanon2018/12/15 04:59 AM
                                Sunny Cove wideanon2018/12/15 05:59 AM
                                  Sunny Cove wideanon2018/12/15 06:03 AM
                                Sunny Cove widea_different_anon2018/12/15 06:45 AM
                              Sunny Cove wideSeni2018/12/15 05:25 AM
                                Sunny Cove wideanon2018/12/15 06:02 AM
                                  Sunny Cove wideLinus Torvalds2018/12/15 09:52 AM
                                    Sunny Cove wideanon2018/12/15 10:13 AM
                                      Sunny Cove wideTravis Downs2018/12/16 10:15 AM
                                      Sunny Cove wideanon2018/12/16 11:42 PM
                                        how many anons here? (NT)Michael S2018/12/17 01:46 AM
                      Sunny Cove wideTravis Downs2018/12/15 09:08 AM
                        Sunny Cove wideanon2018/12/15 09:55 AM
                          Sunny Cove wideTravis Downs2018/12/16 08:19 AM
                            Sunny Cove wideanon2018/12/16 09:37 AM
                              Sunny Cove wideTravis Downs2018/12/16 09:57 AM
                                Sunny Cove wideanon2018/12/16 11:04 AM
                                  Sunny Cove wideTravis Downs2018/12/16 06:51 PM
                          Sunny Cove wideTravis Downs2018/12/16 10:32 AM
        Sunny Cove wideSeni2018/12/13 03:20 PM
          Fair enough! (NT)Travis Downs2018/12/13 03:43 PM
  Sunny Cove wide-.-2018/12/13 03:37 AM
    Sunny Cove wideanon2018/12/13 08:06 AM
      Sunny Cove wideTravis Downs2018/12/13 08:39 AM
        Sunny Cove wideanon2018/12/13 11:09 AM
          Sunny Cove wideTravis Downs2018/12/13 11:27 AM
            Sunny Cove wideanon2018/12/13 12:11 PM
    Sunny Cove wideTravis Downs2018/12/13 08:23 AM
      Sunny Cove wideanonymous22018/12/13 02:20 PM
        Sunny Cove wideTravis Downs2018/12/13 04:00 PM
          Sunny Cove wideanon³2018/12/13 09:34 PM
            Sunny Cove wideTravis Downs2018/12/16 06:53 PM
Reply to this Topic
Body: No Text
How do you spell purple?