Shop OBEX P1 Docs P2 Docs Learn Events
Possible back door in registers for passing data? — Parallax Forums

Possible back door in registers for passing data?

mklrobomklrobo Posts: 420
edited 2014-12-11 19:00 in General Discussion
:) Hello! :)
I would like to pose a question, where permissible.
I was playing with assembly with the propeller, and have run across some
registers that do not use some upper bits of their register(reserved for future use).
that is not used in regular programming.
Would it be possible to pass information in the upper registers, and then
retrieve them when shifting right? If so, things could get complex in
a dual way.(no other part of regular programming would corrupt the data)
If this phenomena is in every processor, could hackers
exploit this to pass malware? (in a very small way, of course.)
Just a thought.

Comments

  • tonyp12tonyp12 Posts: 1,951
    edited 2014-12-11 09:10
    Special registers are often read or write only, writing to a read-only will result in that Destination version is updated only.
    Kind of hard to later read it, maybe Test instruction as mask vs data is interchangeable on this instruction.

    Not worth it if you are wasting a extra long in the code to handle it that could be used for data further down and have room for 32 bit flags.
  • mklrobomklrobo Posts: 420
    edited 2014-12-11 10:39
    :) Thanks!
    I was thinking of using that unused space for storing, to cut down
    on clock cycles for RWLONG commands.(8.23 clock cycles)
    I know that may sound nit - picking, but hey, a cycle saved is
    a cycle earned! (Ha!) :)
  • ElectrodudeElectrodude Posts: 1,658
    edited 2014-12-11 19:00
    It's not worth it to waste a long or two or three every single time you want to access a variable just to save a single long. It will only result in slower and bigger code.
Sign In or Register to comment.