This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Thumb inline assembly
- From: Kalai Rajah N <kalairajah at gmail dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Tue, 11 Jun 2013 11:27:08 -0700
- Subject: Re: Thumb inline assembly
- References: <CAPTDLfFZp2Z_arQO0iRRFFQMxuj1=AC6zxgv4Q=F2GVxY23qVA at mail dot gmail dot com> <CAKOQZ8xEqJX1cEHBOKdswKc6gh1SVczQu_-0ZNsgxtNkoyOj2A at mail dot gmail dot com> <CAPTDLfEfMB1o2nwVo8OqmeHFg04hYe2EOn7QN=e9Wgy53U+HzQ at mail dot gmail dot com> <CAKOQZ8xnJpX14ZnDHzZDrgRcHyw6JESdC0xCyTkKAWiDiGB6Pw at mail dot gmail dot com> <CAPTDLfE=4OsyEkYEiPTjCZZ8m7AOzqHcQEC7kHEi+xube=Q-kg at mail dot gmail dot com> <CAKOQZ8z+0+c3P3Pt_4gihVHOM2hLMtpKHBnVsVnj30ucvwkuLw at mail dot gmail dot com> <CAPTDLfH--WkreVXSDb7nt6KsKP+vBH3q_eoJX7yvqm=O8QzF0A at mail dot gmail dot com> <CAPTDLfG_XuCfGrs6fur6W6trnDxp=y+7fvcQKCTCp7ecQ5XxCA at mail dot gmail dot com> <CAKOQZ8z-ffmwbk25segA8bb8mcxzdA1JVfSxOVMTfdko8mA4CA at mail dot gmail dot com> <CAPTDLfFcL5ZsxK0BAYN7HTFom4LLYazs7Q+T4dx43Cmw5zzh1w at mail dot gmail dot com> <CAKOQZ8yN6GvxDCbGUi-wV43e-==KK=+TZ6tSfsxqvf8n7VYoLg at mail dot gmail dot com>
Thanks. Changing that line works. I had this code working in the
function directly as I was passing immediates. When this is called
through a function, it takes registers and I had to update it
accordingly.
On Mon, Jun 10, 2013 at 6:01 PM, Ian Lance Taylor <iant@google.com> wrote:
> On Mon, Jun 10, 2013 at 5:41 PM, Kalai Rajah N <kalairajah@gmail.com> wrote:
>
>> "ldr r1, =%0 /* load the nvic_iser* register */ \n\t"
>
> The references are coming from your lines like the above. I don't
> know what this syntax means. You are asking GCC to put a register
> name in there, so the result is something like
> ldr r1, =r1
> This winds up referring to a symbol named r1, rather than the register r1.
>
> Ian