I'm trying to understand the syntax of writing in assembly to first write the code correctly and second efficiently.
in this example it shows the example using
asm volatile ("MRS %0, PMUSERENR_EL0\n": "=r"(value));
asm volatile ("MSR PMUSERENR_EL0, %0\n":: "r"(value));
:9:2: error: output operand constraint lacks '='
Found the answer in this book:https://books.google.com/books?id=Bl0_hWV20TAC&pg=PA370&lpg=PA370&dq=two+colon+%22::%22+in+assembly+language&source=bl&ots=Ha8EkNUJee&sig=p6v6iPOCYjBJdmBBVx2ZdxoRT2I&hl=en&sa=X&ved=0ahUKEwj8xcOElYnMAhVQ_WMKHR-JC7IQ6AEIRjAH#v=onepage&q=two%20colon%20%22%3A%3A%22%20in%20assembly%20language&f=false
If no output values are associated with the assembly code, the section must be blank, but two colons must still separate the assembly code from the input operands.
The why is because that's the standard. One colon for outputs and two for inputs.