Displaying 20 results from an estimated 4000 matches similar to: "RISC-V disassembly doesn't seem to know about multiply instructions"
2020 Mar 27
3
llvm-objdump cannot recognize mul&mulh RISC-V M Instructions
I am using llvm-project compiling risc-v programs.
llvm-project version:dd8a2013dc1804be1b7d9cffacad2e984300bd22
Instructons to build LLVM+clang:
```
cmake -G Ninja
-DCMAKE_INSTALL_PREFIX=/home/llvm/workspace/llvm/llvm-project/llvm_install
-DCMAKE_BUILD_TYPE="Release"
-DDEFAULT_SYSROOT="/home/llvm/workspace/riscv/riscv-tc-20200220/bin/riscv32-unknown-elf"
2017 Jul 11
4
[LLD] Linker Relaxation
By the way, since this is an optional code relaxation, we can think about
it later. The first thing I would do is to add RISC-V support to lld
without code shrinking relaxations, which I believe is doable by at most a
few hundreds lines of code.
On Wed, Jul 12, 2017 at 3:21 AM, Rui Ueyama <ruiu at google.com> wrote:
> On Tue, Jul 11, 2017 at 9:14 PM, Bruce Hoult via llvm-dev <
>
2017 Jul 11
8
[LLD] Linker Relaxation
Here's an example using the gcc toolchain for embedded 32 bit RISC-V (my
HiFive1 board):
#include <stdio.h>
int foo(int i){
if (i < 100){
printf("%d\n", i);
}
return i;
}
int main(){
foo(10);
return 0;
}
After compiling to a .o with -O2 -march=RV32IC we get (just looking at foo)
00000000 <foo>:
0: 1141 addi sp,sp,-16
2017 Aug 21
4
RISC-V LLVM status update
As you will have seen from previous postings, I've been working on upstream
LLVM support for the RISC-V instruction set architecture. The initial RFC
<http://lists.llvm.org/pipermail/llvm-dev/2016-August/103748.html>
provides a good overview of my approach. Thanks to funding from a third party,
I've recently been able to return to this effort as my main focus. Now feels
like a good
2020 Sep 29
2
[riscv] How do I use the RISC-V Vector extension instructions in LLVM IR?
Hi Everyone,
I am wondering how to use RISC-V V (Vector) extension instructions in
LLVM IR. In 2019 Kruppe and Espasa gave a talk [1] overviewing the
Vector extension and on slide 16 [2] they show LLVM IR samples which use
the vector instructions through intrinsic functions, such as:
%vl = call i32 @llvm.riscv.vsetvl(i32 %n)
At the time of the talk (April 2019) LLVM support for the V
2019 Jul 11
2
Manipulating global address inside GlobalAddress SDNode in (RISCV) LLVM backend
>
> I don't think there's a real shortage of those, but I confess I'm not
> sure why that's related. You'd need a representation for the LUI and
> ADDI after instruction selection anyway.
Yeah at the end we need a representation for LUI and ADDI. We were trying
to break the 64 bit address from GlobalAddress node into two i32 register.
We will add custom load/store
2016 Aug 17
14
[RFC] RISC-V backend
Hi all,
I am proposing the integration of a backend targeting the RISC-V ISA.
RISC-V is a free and open instruction set architecture that was originally
developed at UC Berkeley. Future development of the ISA specification will be
handled by the 501(c)(6) non-profit RISC-V Foundation and its members
<https://riscv.org/membership/?action=viewlistings>. You can find much more
information at
2017 Jul 11
2
[LLD] Linker Relaxation
Hi,
Does lld support linker relaxation that may shrink code size? As far
as I see lld seems to assume that the content of input sections to be
fixed other than patching up relocations, but I believe some targets
may benefit the extra optimization opportunity with relaxation.
Specifically, I'm currently working on adding support for RISC-V in
lld, and RISC-V heavily relies on linker relaxation
2016 Sep 14
5
[PATCH 1/2] filearch: Add RISC-V architecture.
---
src/filearch.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/src/filearch.c b/src/filearch.c
index 5985b73..cbc8372 100644
--- a/src/filearch.c
+++ b/src/filearch.c
@@ -56,14 +56,16 @@ cleanup_magic_t_free (void *ptr)
# endif
COMPILE_REGEXP (re_file_elf,
- "ELF.*(MSB|LSB).*(?:executable|shared object|relocatable),
2020 Apr 26
2
assembly code for array iteration generated by llvm is much slower than gcc
Hi all developers,
I'm changing compiler from gcc to llvm on a RISCV target now. but I found in some case the assembly code generated by llvm is much more than gcc. It cause my program's performance about 40% decrease.
The flowing is a simple test code. It shows the problem. We can see than gcc prefer to use pointer to iterate the array, but llvm perfere to use index to iterate
2018 Mar 02
2
Segmentation fault when using llc to target riscv.
I am using LLVM version 4.0.1
Running `llc -march=riscv64 math.ll` returns:
#0 0x0000000000fed7d1 (llc+0xfed7d1)
#1 0x0000000000fec559 (llc+0xfec559)
#2 0x0000000000fec8d9 (llc+0xfec8d9)
#3 0x00007f22c044e5e0 __restore_rt (/lib64/libpthread.so.0+0xf5e0)
#4 0x0000000000d7faf3 (llc+0xd7faf3)
#5 0x0000000000cd4b88 (llc+0xcd4b88)
#6 0x0000000000cd530c (llc+0xcd530c)
#7 0x00000000006858c3
2019 Jan 30
2
[8.0.0 Release] rc1 has been tagged
Alex, ping? There was a thread about moving Risc-V out of experimental
but I think it didn't go anywhere?
Separately, do the listed patches sound okay for merging?
Thanks,
Hans
On Fri, Jan 25, 2019 at 4:40 PM Bruce Hoult <brucehoult at sifive.com> wrote:
>
> In https://llvm.org/svn/llvm-project/llvm/branches/release_80 I find
> that RISCV is still in
2019 Jul 11
2
Manipulating global address inside GlobalAddress SDNode in (RISCV) LLVM backend
On Thu, Jul 11, 2019 at 10:21 PM Tim Northover <t.p.northover at gmail.com>
wrote:
> On Thu, 11 Jul 2019 at 17:16, Reshabh Sharma <reshabhsh at gmail.com> wrote:
> > We thought LUI and ADDI pair will be good to store the values in a i32
> register.
>
> With you so far, I think. To be explicit, to materialize a full 64-bit
> pointer you'd need 4 instructions:
2019 Jul 11
6
Glue to connect two nodes in LLVM backend
Hello everyone,
I wanted to attach a node without affecting the present nodes in any way. I
tried to use MVT::Glue for that but I think I'm missing something as I
could not achieve the below state.
LUI LUI
| |
ADDI ----GLUE---- ADDI
|
store
I've few question about this and Glue node in general, I'll be happy to get
some help on
2013 Apr 05
3
[LLVMdev] Generate addi 40, r3 instruction
I want to generate the instruction like
addi 40, r3 ! i.e. r3 = r3 + 40
The format i wrote is
def ADDI : F1<opcode, (outs IntRegs:$dst), (ins IntRegs:$dst, i32imm:$imm)
"addi $imm, $dst",
[(set $IntRegs:$dst, (add $IntRegs:$dst, i32imm:$c))]
but it is not compiling.
what should be the format.
vikram
--
View this message
2018 Jun 13
12
RFC: Atomic LL/SC loops in LLVM revisited
# RFC: Atomic LL/SC loops in LLVM revisited
## Summary
This proposal gives a brief overview of the challenges of lowering to LL/SC
loops and details the approach I am taking for RISC-V. Beyond getting feedback
on that work, my intention is to find consensus on moving other backends
towards a similar approach and sharing common code where feasible. Scroll down
to 'Questions' for a summary
2020 Jun 24
2
FW: Restrict qualifier on class members
Hi Jeroen,
Sorry, I missed that. I tried the patch, and this program:
#include <stdint.h>
#define __remote __attribute__((address_space(1)))
__remote int* A;
__remote int* B;
void vec_add(__remote int* __restrict a,
__remote int* __restrict b,
int n) {
#pragma unroll 4
for(int i=0; i<n; ++i) {
a[i] += b[i];
}
}
int main(int argc, char** argv) {
2014 Nov 26
2
[LLVMdev] How to make correct pattern for instruction?
Hi,
I'm a beginner user using LLVM, and I'm trying to create a new backend
using CPU0 Tutorial as reference.
I have two instructions for add: add and addi (this is a pseudo
instruction, but imediate operations is not available in architecture).
That is my idea: When the LLVM instruction selection find addi r3 = r2 +
value
must convert to this:
- load r1, value
- add r3 = r2 + r1
In
2015 Nov 21
2
[lld] R_MIPS_HI16 / R_MIPS_LO16 calculation
On Sat, Nov 21, 2015 at 9:28 AM, Rui Ueyama <ruiu at google.com> wrote:
> On Fri, Nov 20, 2015 at 10:13 PM, Simon Atanasyan <simon at atanasyan.com>
> wrote:
>>
>> In case of MIPS O32 ABI we have to find a matching R_MIPS_LO16
>> relocation to calculate R_MIPS_HI16 one because R_MIPS_HI16 uses
>> combined addend (AHI << 16) + (short)ALO where AHI is
2014 Nov 27
2
[LLVMdev] How to make correct pattern for instruction?
Hi Johnny,
Thank you for your help. I guess the pseudo instruction does not interfere in
the generated assembly code.
I'll check the file that describes the registers and I hope understand why
the assembly code is printed wrong (now is printed things like add r1, r0,
-40).
Cheers,
Carlos
Carlos Almeida Jr
On Thu, Nov 27, 2014 at 7:56 AM, Johnny Val <johnnydval at gmail.com> wrote: