6

In an assembler instruction like

movi    v30.2S, #0x3c, msl #0x8

msl will cause that the value 0x3cff (value is shifted left and ones are inserted at the bottom) is moved to the target but what does MSL stand for? For example LSL stands for "Logical Shift Left".

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
rfalke
  • 451
  • 4
  • 7
  • Magical Shift Left... though, it might have just been "modified" shift left. – Ruslan Sep 29 '21 at 08:35
  • 1
    `lsl` is left shift with zero-fill of low order bits, while 'msl' is left shift with one-fill of low order bits. So "modified shift left" sounds reasonable, but I have yet to find it spelled out in official ARM documentation. – njuffa Sep 29 '21 at 09:37
  • On other CPUs, for example on m68k, the two kinds of shifts are Logical and Arithmetic. Perhaps M is mathematic(al)? – chexum Sep 29 '21 at 16:35
  • 2
    @chexum: That sounds implausible to me, given what it does. Normal left shift (shifting in zeros) multiplies by 2 for signed or unsigned numbers. Some ISAs, like x86, have mnemonic synonyms for arithmetic and logical left shift, but they use the same machine code because it's the same operation. ARM does have logical and arithmetic *right* shifts. But this MSL is *not* a simple mathematical operation. It's multiplying by a power of 2 and adding one less than that power of 2. i.e. `x * 2^n + (2^n-1)` – Peter Cordes Sep 29 '21 at 17:24

1 Answers1

3

I'm not 100% sure on this, but based on the capstone documentation, it may stand for "Masking shift lift".

Only thing I question about it is that it says lsl may stand for "Logical shift lift", and not "Logical shift left", so maybe "Masking shift left"?

screenshot in case it goes down

Siguza
  • 21,155
  • 6
  • 52
  • 89
spv
  • 46
  • 1
  • 2
    [This blog post](http://web.archive.org/web/20150327020657/http://community.arm.com/groups/processors/blog/2014/12/16/a64-shift-and-extend-operations-operand-modifiers) written by an ARM employee confirms that name. – neat Sep 29 '21 at 17:43