8000 GitHub - openrisc/gcc at smh-port
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 2, 2022. It is now read-only.
/ gcc Public archive
forked from stffrdhrn/gcc

This is not the project you are looking for check openrisc/or1k-gcc.

License

GPL-2.0 and 2 other licenses found

Licenses found

GPL-2.0
COPYING
LGPL-2.1
COPYING.LIB
Unknown
COPYING.RUNTIME
Notifications You must be signed in to change notification settings

openrisc/gcc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GCC with SMH Dummy Patches

DONE I have done up to step 15 and I am calling it a success. I have learned enough about writing the GCC backend to get started on the or1k backed. Therefore I am abondoning this port.

This is the port of the dummy architecture smh. This is done following the 21 patches series for ggx which became moxie.

Here I used the latest GCC so the patches are quite a bit different in places. I will try to keep notes of the differences below.

P11 differences

The original patches for ggx are pretty old now and using many deprecated API's. This required significant updates, but it was a good exercise in understanding the dependencies of a GCC back-end.

Also, current GCC builds run a series of self tests which do not allow abort() definitions. This means the original patch 11 does not build completely. I am getting a failure I hope this improves going forward.

  • Using name SMH instead of ggx.
  • Update gcc/config.gcc too
  • Not using Old Constraints in smh.h
  • Renovate poison HARD_REGNO_MODE_OK to TARGET_HARD_REGNO_MODE_OK
  • Renovate poison HARD_REGNO_NREGS to TARGET_...
  • Renovate poison MODES_TIEABLE_P to TARGET_...
  • Renovate poison LEGITIMATE_CONSTANT_P to TARGET_...
  • Renovate poison FRAME_POINTER_REQUIRED to TARGET_...
  • Removed poison RETURN_POPS_ARGS, depend on default
  • Removed poison TRULY_NOOP_TRUNCATION, depend on default
  • Redefine INITIALIZE_TRAMPOLINE as TARGET_TRAMPOLINE_INIT
  • Renovate GO_IF_MODE_DEPENDENT_ADDRESS to TARGET_LEGITIMATE_ADDRESS_P
  • Define nop required
  • Define ELIMINAL_REGS required
  • Define INITIAL_ELIMINATION_OFFSET required
  • Don't use abort() for TARGET_ macros. for now don't define to get default implementation.
  • Remove CLASS_MAX_NREGS definition as default implementation is the same.

P12 differences

It works and also selftests now pass.

  • Dont define LEGITIMATE_CONSTANT_P as its default is true and we need TARGET_... now anyway.
  • Define INITIAL_ELIMINATION_OFFSET copied from Moxie
  • Define machine_function needed for INITIAL_ELIMINATION_OFFSET
  • Added include for gt-smh.h which is needed with option_override
../../local/bin/smh-elf-run -t start
insn:     # 0x0000107c: $sp = 0x30000
insn:     # 0x00001082: $fp = 0x0
insn:     # 0x00001088: jsra 0x1074
insn:     # 0x00001074: $r0 = 0x555
insn:     # 0x0000107a: ret (to 0x108e)
insn:     SIGILL1
program stopped with signal 4 (Illegal instruction).

P13 differences

  • Use TARGET_CAN_ELIMINATE instead of poison CAN_ELIMINATE
  • Define Fake FP and AG registers differently

Had more issues, currently prologue/epilogue do not generate push and pop instructions for some reason. However, moving on.

About

This is not the project you are looking for check openrisc/or1k-gcc.

Resources

License

GPL-2.0 and 2 other licenses found

Licenses found

GPL-2.0
COPYING
LGPL-2.1
COPYING.LIB
Unknown
COPYING.RUNTIME

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 45.1%
  • Ada 15.9%
  • C++ 14.2%
  • Go 7.2%
  • D 6.2%
  • GCC Machine Description 4.1%
  • Other 7.3%
0