linux-mips
[Top] [All Lists]

Immediate branch offset

To: linux-mips@linux-mips.org
Subject: Immediate branch offset
From: Alexis BRENON <abrenon@wyplay.com>
Date: Fri, 07 Jun 2013 12:34:33 +0200
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130510 Thunderbird/17.0.6
Hi everyone,

I'm new on the list, so I'll make a short introduction of me.
First of all, I'm french, so, please, be indulgent for my english mistakes...
I'm working on the Pypy project, to create a MIPS backend (a MIPS JIT).

To create the JIT, I have to load some MIPS instruction directly in memory without passing through a .asm file or else. So, I cannot set some labels. So to make some branches, I try to load the equivalent instruction of :
    bne $t0, $t1, -8
to go back, just before the bne instruction, if $t0 and $t1 are equals. But when it run, I've got an illegal instruction error. To debug, I write a small program in the MARS MIPS simulator with this instruction. But when compiling, assembler says me that -8 is an operand of incorrect type. I would like to know if it's possible to make a branch, with an immediate offset, or have I to always provide a label ?

I hope my question is clear.
Thanks for your attention, and for your answer :-p

Alexis BRENON

P.S. I try to go to the IRC channel, but I receive '#mipslinux :Cannot send to channel' every time I send message. Is there any particular process to join the channel ?

<Prev in Thread] Current Thread [Next in Thread>