[m32 ARM Linux] Getting there.. [drawergen error]

Moderators: Rachael, dpJudas

Locked
User avatar
ConSiGno
Posts: 12
Joined: Sun Jan 08, 2017 6:05

[m32 ARM Linux] Getting there.. [drawergen error]

Post by ConSiGno »

Code: Select all

 [ 19%] Building CXX object tools/drawergen/CMakeFiles/drawergen.dir/ssa/ssa_vec8s.cpp.o
/home/pi/Code/qzdoom/tools/drawergen/ssa/ssa_vec8s.cpp:66:120: error: too many arguments to function call, expected at most 2, have 3
        llvm::Value *int16x4_i0 = SSAScope::builder().CreateCall(SSAScope::intrinsic(llvm::Intrinsic::arm_neon_vqmovns, i0.v, SSAScope::hint());
                                                                 ~~~~~~~~~~~~~~~~~~~                                          ^~~~~~~~~~~~~~~~
/home/pi/Code/qzdoom/tools/drawergen/ssa/ssa_scope.h:35:2: note: 'intrinsic' declared here
        static llvm::Function *intrinsic(llvm::Intrinsic::ID id, llvm::ArrayRef<llvm::Type *> parameter_types = llvm::ArrayRef<llvm::Type*>());
        ^
/home/pi/Code/qzdoom/tools/drawergen/ssa/ssa_vec8s.cpp:183:2: error: expected ';' at end of declaration
}
 ^
 ;
/home/pi/Code/qzdoom/tools/drawergen/ssa/ssa_vec8s.cpp:183:2: error: expected '}'
/home/pi/Code/qzdoom/tools/drawergen/ssa/ssa_vec8s.cpp:64:1: note: to match this '{'
{
^
3 errors generated.
tools/drawergen/CMakeFiles/drawergen.dir/build.make:566: recipe for target 'tools/drawergen/CMakeFiles/drawergen.dir/ssa/ssa_vec8s.cpp.o' failed
make[2]: *** [tools/drawergen/CMakeFiles/drawergen.dir/ssa/ssa_vec8s.cpp.o] Error 1
CMakeFiles/Makefile2:463: recipe for target 'tools/drawergen/CMakeFiles/drawergen.dir/all' failed
make[1]: *** [tools/drawergen/CMakeFiles/drawergen.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
 
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: [m32 ARM Linux] Getting there.. [drawergen error]

Post by dpJudas »

Okay, pushed a fix for that. The kind of thing that happens when you try to code for a platform without having neither the hardware or the software. :D

If this actually compiles and runs now, it will be a miracle of biblical proportions. :)
User avatar
ConSiGno
Posts: 12
Joined: Sun Jan 08, 2017 6:05

Re: [m32 ARM Linux] Getting there.. [drawergen error]

Post by ConSiGno »

got further into compilation! woot!

still some issues down the line:

Code: Select all

Scanning dependencies of target drawergen
[ 19%] Building CXX object tools/drawergen/CMakeFiles/drawergen.dir/ssa/ssa_vec8s.cpp.o
/home/pi/Code/qzdoom/tools/drawergen/ssa/ssa_vec8s.cpp:68:2: error: constructor 'SSAVec8s' should not return a value [-Wreturn-type]
        return shuffle(from_llvm(int16x4_i0), from_llvm(int16x4_i1), 0, 1, 2, 3, 4, 5, 6, 7);
        ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
tools/drawergen/CMakeFiles/drawergen.dir/build.make:566: recipe for target 'tools/drawergen/CMakeFiles/drawergen.dir/ssa/ssa_vec8s.cpp.o' failed
make[2]: *** [tools/drawergen/CMakeFiles/drawergen.dir/ssa/ssa_vec8s.cpp.o] Error 1
CMakeFiles/Makefile2:463: recipe for target 'tools/drawergen/CMakeFiles/drawergen.dir/all' failed
make[1]: *** [tools/drawergen/CMakeFiles/drawergen.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
User avatar
Rachael
Developer
Developer
Posts: 3640
Joined: Sat May 13, 2006 10:30

Re: [m32 ARM Linux] Getting there.. [drawergen error]

Post by Rachael »

dpJudas wrote:Okay, pushed a fix for that. The kind of thing that happens when you try to code for a platform without having neither the hardware or the software. :D

If this actually compiles and runs now, it will be a miracle of biblical proportions. :)
Want shell access? ;)

Right now, mine's literally doing nothing more than running VLC Media Player to a radio stream.

Although - mine does not have the proper LLVM - so you might have to fix the apt to get Debian Jessie repos.

All I ask is you don't break it to the point where it bricks and I have to reformat the SD card - although I suppose it wouldn't be that hard to do it at this point since I already have experience with it - it's just running apt upgrade with a fresh install is a nightmare. XD
User avatar
ConSiGno
Posts: 12
Joined: Sun Jan 08, 2017 6:05

Re: [m32 ARM Linux] Getting there.. [drawergen error]

Post by ConSiGno »

we're so close with this now!

Code: Select all

[ 19%] Linking CXX executable drawergen
CMakeFiles/drawergen.dir/drawergen.cpp.o: In function `llvm::InitializeNativeTarget()':
/usr/lib/llvm-3.9/include/llvm/Support/TargetSelect.h:119: undefined reference to `LLVMInitializeARMTargetInfo'
/usr/lib/llvm-3.9/include/llvm/Support/TargetSelect.h:120: undefined reference to `LLVMInitializeARMTarget'
/usr/lib/llvm-3.9/include/llvm/Support/TargetSelect.h:121: undefined reference to `LLVMInitializeARMTargetMC'
CMakeFiles/drawergen.dir/drawergen.cpp.o: In function `llvm::InitializeNativeTargetAsmPrinter()':
/usr/lib/llvm-3.9/include/llvm/Support/TargetSelect.h:133: undefined reference to `LLVMInitializeARMAsmPrinter'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
tools/drawergen/CMakeFiles/drawergen.dir/build.make:905: recipe for target 'tools/drawergen/drawergen' failed
make[2]: *** [tools/drawergen/drawergen] Error 1
CMakeFiles/Makefile2:463: recipe for target 'tools/drawergen/CMakeFiles/drawergen.dir/all' failed
make[1]: *** [tools/drawergen/CMakeFiles/drawergen.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: [m32 ARM Linux] Getting there.. [drawergen error]

Post by dpJudas »

We'll see. :) It really depends on what the next error will be. That's when the drawergen tool will run and actually try use those NEON intrinsics I added. *crosses fingers*
User avatar
ConSiGno
Posts: 12
Joined: Sun Jan 08, 2017 6:05

Re: [m32 ARM Linux] Getting there.. [drawergen error]

Post by ConSiGno »

Okay, some explanation, before we tear our hair out over segfaults:

The Raspberry Pi 3 is a Cortex A53 Processor. the Operating system though, is this:

Code: Select all

Linux raspberrypi 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux
And it's not exactly running in armv8 mode: https://www.raspberrypi.org/forums/view ... 3&t=140572

The reasoning is for Backwards compatibility. So, we can't really use armv8 specific functions. UGH. looks like "ARMv7l" is what's expected.
User avatar
ConSiGno
Posts: 12
Joined: Sun Jan 08, 2017 6:05

Re: [m32 ARM Linux] Getting there.. [drawergen error]

Post by ConSiGno »

And for additional giggles, I threw this into llvm and, WOW:

Code: Select all

pi@raspberrypi:~/Code/qzdoom/Release $ llvm-as-3.9 < /dev/null | llc-3.9 -march=arm -mcpu=help
Available CPUs for this target:

  arm1020e      - Select the arm1020e processor.
  arm1020t      - Select the arm1020t processor.
  arm1022e      - Select the arm1022e processor.
  arm10e        - Select the arm10e processor.
  arm10tdmi     - Select the arm10tdmi processor.
  arm1136j-s    - Select the arm1136j-s processor.
  arm1136jf-s   - Select the arm1136jf-s processor.
  arm1156t2-s   - Select the arm1156t2-s processor.
  arm1156t2f-s  - Select the arm1156t2f-s processor.
  arm1176jz-s   - Select the arm1176jz-s processor.
  arm1176jzf-s  - Select the arm1176jzf-s processor.
  arm710t       - Select the arm710t processor.
  arm720t       - Select the arm720t processor.
  arm7tdmi      - Select the arm7tdmi processor.
  arm7tdmi-s    - Select the arm7tdmi-s processor.
  arm8          - Select the arm8 processor.
  arm810        - Select the arm810 processor.
  arm9          - Select the arm9 processor.
  arm920        - Select the arm920 processor.
  arm920t       - Select the arm920t processor.
  arm922t       - Select the arm922t processor.
  arm926ej-s    - Select the arm926ej-s processor.
  arm940t       - Select the arm940t processor.
  arm946e-s     - Select the arm946e-s processor.
  arm966e-s     - Select the arm966e-s processor.
  arm968e-s     - Select the arm968e-s processor.
  arm9e         - Select the arm9e processor.
  arm9tdmi      - Select the arm9tdmi processor.
  cortex-a12    - Select the cortex-a12 processor.
  cortex-a15    - Select the cortex-a15 processor.
  cortex-a17    - Select the cortex-a17 processor.
  cortex-a32    - Select the cortex-a32 processor.
  cortex-a35    - Select the cortex-a35 processor.
  cortex-a5     - Select the cortex-a5 processor.
  cortex-a53    - Select the cortex-a53 processor.
  cortex-a57    - Select the cortex-a57 processor.
  cortex-a7     - Select the cortex-a7 processor.
  cortex-a72    - Select the cortex-a72 processor.
  cortex-a73    - Select the cortex-a73 processor.
  cortex-a8     - Select the cortex-a8 processor.
  cortex-a9     - Select the cortex-a9 processor.
  cortex-m0     - Select the cortex-m0 processor.
  cortex-m0plus - Select the cortex-m0plus processor.
  cortex-m1     - Select the cortex-m1 processor.
  cortex-m3     - Select the cortex-m3 processor.
  cortex-m4     - Select the cortex-m4 processor.
  cortex-m7     - Select the cortex-m7 processor.
  cortex-r4     - Select the cortex-r4 processor.
  cortex-r4f    - Select the cortex-r4f processor.
  cortex-r5     - Select the cortex-r5 processor.
  cortex-r7     - Select the cortex-r7 processor.
  cortex-r8     - Select the cortex-r8 processor.
  cyclone       - Select the cyclone processor.
  ep9312        - Select the ep9312 processor.
  exynos-m1     - Select the exynos-m1 processor.
  generic       - Select the generic processor.
  iwmmxt        - Select the iwmmxt processor.
  krait         - Select the krait processor.
  mpcore        - Select the mpcore processor.
  mpcorenovfp   - Select the mpcorenovfp processor.
  sc000         - Select the sc000 processor.
  sc300         - Select the sc300 processor.
  strongarm     - Select the strongarm processor.
  strongarm110  - Select the strongarm110 processor.
  strongarm1100 - Select the strongarm1100 processor.
  strongarm1110 - Select the strongarm1110 processor.
  swift         - Select the swift processor.
  xscale        - Select the xscale processor.

Available features for this target:

  32bit              - Prefer 32-bit Thumb instrs.
  8msecext           - Enable support for ARMv8-M Security Extensions.
  a12                - Cortex-A12 ARM processors.
  a15                - Cortex-A15 ARM processors.
  a17                - Cortex-A17 ARM processors.
  a32                - Cortex-A32 ARM processors.
  a35                - Cortex-A35 ARM processors.
  a5                 - Cortex-A5 ARM processors.
  a53                - Cortex-A53 ARM processors.
  a57                - Cortex-A57 ARM processors.
  a7                 - Cortex-A7 ARM processors.
  a72                - Cortex-A72 ARM processors.
  a73                - Cortex-A73 ARM processors.
  a8                 - Cortex-A8 ARM processors.
  a9                 - Cortex-A9 ARM processors.
  aclass             - Is application profile ('A' series).
  acquire-release    - Has v8 acquire/release (lda/ldaex etc) instructions.
  armv2              - ARMv2 architecture.
  armv2a             - ARMv2a architecture.
  armv3              - ARMv3 architecture.
  armv3m             - ARMv3m architecture.
  armv4              - ARMv4 architecture.
  armv4t             - ARMv4t architecture.
  armv5t             - ARMv5t architecture.
  armv5te            - ARMv5te architecture.
  armv5tej           - ARMv5tej architecture.
  armv6              - ARMv6 architecture.
  armv6-m            - ARMv6m architecture.
  armv6j             - ARMv7a architecture.
  armv6k             - ARMv6k architecture.
  armv6kz            - ARMv6kz architecture.
  armv6s-m           - ARMv6sm architecture.
  armv6t2            - ARMv6t2 architecture.
  armv7-a            - ARMv7a architecture.
  armv7-m            - ARMv7m architecture.
  armv7-r            - ARMv7r architecture.
  armv7e-m           - ARMv7em architecture.
  armv7k             - ARMv7a architecture.
  armv7s             - ARMv7a architecture.
  armv8-a            - ARMv8a architecture.
  armv8-m.base       - ARMv8mBaseline architecture.
  armv8-m.main       - ARMv8mMainline architecture.
  armv8.1-a          - ARMv81a architecture.
  armv8.2-a          - ARMv82a architecture.
  avoid-movs-shop    - Avoid movs instructions with shifter operand.
  avoid-partial-cpsr - Avoid CPSR partial update for OOO execution.
  crc                - Enable support for CRC instructions.
  crypto             - Enable support for Cryptography extensions.
  d16                - Restrict FP to 16 double registers.
  db                 - Has data barrier (dmb / dsb) instructions.
  dont-widen-vmovs   - Don't widen VMOVS to VMOVD.
  dsp                - Supports DSP instructions in ARM and/or Thumb2.
  expand-fp-mlx      - Expand VFP/NEON MLA/MLS instructions.
  exynosm1           - Samsung Exynos-M1 processors.
  fp-armv8           - Enable ARMv8 FP.
  fp-only-sp         - Floating point unit supports single precision only.
  fp16               - Enable half-precision floating point.
  fullfp16           - Enable full half-precision floating point.
  hwdiv              - Enable divide instructions.
  hwdiv-arm          - Enable divide instructions in ARM mode.
  iwmmxt             - ARMv5te architecture.
  iwmmxt2            - ARMv5te architecture.
  krait              - Qualcomm ARM processors.
  long-calls         - Generate calls via indirect call instructions.
  m3                 - Cortex-M3 ARM processors.
  mclass             - Is microcontroller profile ('M' series).
  mp                 - Supports Multiprocessing extension.
  muxed-units        - Has muxed AGU and NEON/FPU.
  nacl-trap          - NaCl trap.
  neon               - Enable NEON instructions.
  neon-fpmovs        - Convert VMOVSR, VMOVRS, VMOVS to NEON.
  neonfp             - Use NEON for single precision FP.
  no-movt            - Don't use movt/movw pairs for 32-bit imms.
  noarm              - Does not support ARM mode execution.
  nonpipelined-vfp   - VFP instructions are not pipelined.
  perfmon            - Enable support for Performance Monitor extensions.
  prefer-ishst       - Prefer ISHST barriers.
  prefer-vmovsr      - Prefer VMOVSR.
  prof-unpr          - Is profitable to unpredicate.
  r4                 - Cortex-R4 ARM processors.
  r5                 - Cortex-R5 ARM processors.
  r7                 - Cortex-R7 ARM processors.
  ras                - Enable Reliability, Availability and Serviceability extensions.
  rclass             - Is realtime profile ('R' series).
  reserve-r9         - Reserve R9, making it unavailable as GPR.
  ret-addr-stack     - Has return address stack.
  slow-fp-brcc       - FP compare + branch is slow.
  slow-load-D-subreg - Loading into D subregs is slow.
  slow-odd-reg       - VLDM/VSTM starting with an odd register is slow.
  slow-vdup32        - Has slow VDUP32 - prefer VMOV.
  slow-vgetlni32     - Has slow VGETLNi32 - prefer VMOV.
  slowfpvmlx         - Disable VFP / NEON MAC instructions.
  soft-float         - Use software floating point features..
  strict-align       - Disallow all unaligned memory access.
  swift              - Swift ARM processors.
  t2xtpk             - Enable Thumb2 extract and pack instructions.
  thumb-mode         - Thumb mode.
  thumb2             - Enable Thumb2 instructions.
  trustzone          - Enable support for TrustZone security extensions.
  v4t                - Support ARM v4T instructions.
  v5t                - Support ARM v5T instructions.
  v5te               - Support ARM v5TE, v5TEj, and v5TExp instructions.
  v6                 - Support ARM v6 instructions.
  v6k                - Support ARM v6k instructions.
  v6m                - Support ARM v6M instructions.
  v6t2               - Support ARM v6t2 instructions.
  v7                 - Support ARM v7 instructions.
  v7clrex            - Has v7 clrex instruction.
  v8                 - Support ARM v8 instructions.
  v8.1a              - Support ARM v8.1a instructions.
  v8.2a              - Support ARM v8.2a instructions.
  v8m                - Support ARM v8M Baseline instructions.
  v8m.main           - Support ARM v8M Mainline instructions.
  vfp2               - Enable VFP2 instructions.
  vfp3               - Enable VFP3 instructions.
  vfp4               - Enable VFP4 instructions.
  virtualization     - Supports Virtualization extension.
  vldn-align         - Check for VLDn unaligned access.
  vmlx-forwarding    - Has multiplier accumulator forwarding.
  vmlx-hazards       - Has VMLx hazards.
  xscale             - ARMv5te architecture.
  zcz                - Has zero-cycle zeroing instructions.

Use +feature to enable a feature, or -feature to disable it.
For example, llc -mcpu=mycpu -mattr=+feature1,-feature2
Jeeeez.
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: [m32 ARM Linux] Getting there.. [drawergen error]

Post by dpJudas »

I'm not really familiar with the naming conventions of ARM and what the minimum architecture is for NEON or the intrinsics I hooked up.

One step at a time tho - first it needs to build, then the drawergen tool needs to run without LLVM getting grumpy (which it might be if I misread/misunderstood how those intrinsics work). Then QZDoom itself needs to build successfully.
Locked

Return to “Bugs (Archive)”