Benefit of push/pop instructions

By: Jörn Engel (joern.delete@this.purestorage.com), May 17, 2021 12:39 pm
Room: Moderated Discussions
I have trouble explaining why those instructions even exist. If I was designing a CPU/ABI, I would have the stack pointer point to a stack frame and only read/write relative to that frame. Instead we seem to have both a stack pointer and a frame pointer. Or we can choose to compile without frame pointer, but now have trouble walking the stack.

So there is an obvious benefit to the frame pointer. But the only benefit to having an additional stack pointer seems to be that you can use push/pop instructions. Are they really that beneficial, compared to a move relative to frame pointer? Or are we simply stuck with historical mistakes and nobody wants to create a new ABI to fix those mistakes?
 Next Post in Thread >
TopicPosted ByDate
Benefit of push/pop instructionsJörn Engel2021/05/17 12:39 PM
  Benefit of push/pop instructionsMichael S2021/05/17 12:55 PM
    Benefit of push/pop instructionsTravis Downs2021/05/17 01:08 PM
      Benefit of push/pop instructionsMichael S2021/05/18 01:25 PM
    Benefit of push/pop instructionsGabriele Svelto2021/05/17 02:28 PM
      Benefit of push/pop instructionsTravis Downs2021/05/17 10:35 PM
        Benefit of push/pop instructionsGabriele Svelto2021/05/18 12:57 AM
          Benefit of push/pop instructionsJörn Engel2021/05/18 11:48 AM
            Benefit of push/pop instructionsGabriele Svelto2021/05/18 12:40 PM
              Benefit of push/pop instructionsJörn Engel2021/05/18 03:51 PM
  Benefit of push/pop instructionsTravis Downs2021/05/17 01:00 PM
    Benefit of push/pop instructionsJörn Engel2021/05/17 01:58 PM
      Benefit of push/pop instructionsTravis Downs2021/05/17 10:10 PM
        Benefit of push/pop instructionsAdrian2021/05/18 02:39 AM
          Benefit of push/pop instructionsAnon2021/05/18 04:41 AM
            Benefit of push/pop instructionsAdrian2021/05/18 07:58 AM
              Benefit of push/pop instructionsAnon2021/05/18 09:19 AM
                Benefit of push/pop instructionsAdrian2021/05/18 09:57 AM
                  Benefit of push/pop instructionsMichael S2021/05/18 01:14 PM
                    Benefit of push/pop instructionsAdrian2021/05/18 01:59 PM
                      Benefit of push/pop instructionsMichael S2021/05/18 02:28 PM
                        Benefit of push/pop instructionsAdrian2021/05/19 12:26 AM
          Benefit of push/pop instructions---2021/05/18 08:50 AM
        Benefit of push/pop instructionsJörn Engel2021/05/18 12:01 PM
          Benefit of push/pop instructionsJörn Engel2021/05/18 12:01 PM
            Benefit of push/pop instructionsTravis Downs2021/05/18 12:36 PM
            Benefit of push/pop instructionsMichael S2021/05/18 01:35 PM
              Benefit of push/pop instructionsanon2021/05/18 02:34 PM
  Benefit of push/pop instructionsCarson2021/05/17 01:09 PM
Reply to this Topic
Name:
Email:
Topic:
Body: No Text
How do you spell avocado?