Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:

# Note, Github Actions is dumb and only steps - not jobs - can access env.
# Therefore, if you update this, make sure to update the deploy job below.
Expand Down
68 changes: 36 additions & 32 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
*.exe
*.o
*.a
gcc_arm/Makefile
*/Makefile
agbcc
agbcc_arm
old_agbcc
agbcp
agbcp_arm
*/genattr
*/genattrtab
*/gencheck
Expand All @@ -19,35 +21,37 @@ old_agbcc
*/genpeep
*/genrecog
*/config.log
gcc_arm/auto-host.h
gcc_arm/config.cache
gcc_arm/config.log
gcc_arm/config.status
gcc_arm/genrtl.c
gcc_arm/genrtl.h
gcc_arm/insn-attr.h
gcc_arm/insn-attrtab.c
gcc_arm/insn-codes.h
gcc_arm/insn-config.h
gcc_arm/insn-emit.c
gcc_arm/insn-extract.c
gcc_arm/insn-flags.h
gcc_arm/insn-opinit.c
gcc_arm/insn-output.c
gcc_arm/insn-peep.c
gcc_arm/insn-recog.c
gcc_arm/s-attr
gcc_arm/s-attrtab
gcc_arm/s-check
gcc_arm/s-codes
gcc_arm/s-config
gcc_arm/s-emit
gcc_arm/s-extract
gcc_arm/s-flags
gcc_arm/s-genrtl
gcc_arm/s-opinit
gcc_arm/s-output
gcc_arm/s-peep
gcc_arm/s-recog
gcc_arm/tree-check.h
*/auto-host.h
*/config.cache
*/config.log
*/config.status
*/genrtl.c
*/genrtl.h
*/insn-attr.h
*/insn-attrtab.c
*/insn-codes.h
*/insn-config.h
*/insn-emit.c
*/insn-extract.c
*/insn-flags.h
*/insn-opinit.c
*/insn-output.c
*/insn-peep.c
*/insn-recog.c
*/s-attr
*/s-attrtab
*/s-check
*/s-codes
*/s-config
*/s-emit
*/s-extract
*/s-flags
*/s-genrtl
*/s-opinit
*/s-output
*/s-peep
*/s-recog
*/tree-check.h
.DS_Store
*/DS_Store

10 changes: 10 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ mv gcc/agbcc .
rm -f gcc_arm/config.status gcc_arm/config.cache
cd gcc_arm && ./configure --target=arm-elf --host=i386-linux-gnu && make cc1 && cd ..
mv gcc_arm/cc1 agbcc_arm
# c++ compiler
rm -f g++/config.status g++/config.cache
cd g++ && ./configure --target=thumb-elf --disable-werror --with-cpu=arm7tdmi --with-no-thumb-interwork --disable-multilib --enable-languages="c++" --host=i686-pc-linux --build=i686-pc-linux
make clean && make cc1plus && cd ..
mv g++/cc1plus agbcp
rm -f g++_arm/config.status g++_arm/config.cache
cd g++_arm && ./configure --target=arm-elf --disable-werror --with-cpu=arm7tdmi --with-no-thumb-interwork --disable-multilib --enable-languages="c++" --host=i686-pc-linux --build=i686-pc-linux
make clean && make cc1plus && cd ..
mv g++_arm/cc1plus agbcp_arm
# runtime
make -C libgcc clean
make -C libgcc $CCOPT $CXXOPT
mv libgcc/libgcc.a .
Expand Down
100 changes: 100 additions & 0 deletions g++/.gdbinit
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
define pr
set debug_rtx ($)
end

document pr
Print the full structure of the rtx that is $.
Works only when an inferior is executing.
end

define prl
set debug_rtx_list ($, debug_rtx_count)
end

document prl
Print the full structure of all rtx insns beginning at $.
Works only when an inferior is executing.
Uses variable debug_rtx_count to control number of insns printed:
debug_rtx_count > 0: print from $ on.
debug_rtx_count < 0: print a window around $.

There is also debug_rtx_find (rtx, uid) that will scan a list for UID and print
it using debug_rtx_list. Usage example: set $foo=debug_rtx_find(first, 42)
end

define pt
set debug_tree ($)
end

document pt
Print the full structure of the tree that is $.
Works only when an inferior is executing.
end

define ptc
output (enum tree_code) $.common.code
echo \n
end

document ptc
Print the tree-code of the tree node that is $.
end

define pdn
output $.decl.name->identifier.pointer
echo \n
end

document pdn
Print the name of the decl-node that is $.
end

define ptn
output $.type.name->decl.name->identifier.pointer
echo \n
end

document ptn
Print the name of the type-node that is $.
end

define prc
output (enum rtx_code) $.code
echo \ (
output $.mode
echo )\n
end

document prc
Print the rtx-code and machine mode of the rtx that is $.
end

define pi
print $.fld[0].rtx@7
end

document pi
Print the fields of an instruction that is $.
end

define pbs
set print_binding_stack ()
end

document pbs
In cc1plus, print the current binding stack, frame by frame, up to and
including the global binding level.
end

# Don't let abort actually run, as it will make
# stdio stop working and therefore the `pr' command below as well.
b abort

# Put breakpoints at exit and fancy_abort in case abort is mapped
# to either fprintf/exit or fancy_abort.
b exit
b fancy_abort

# Make gdb complain about symbol reading errors. This is so that gcc
# developers can see and fix bugs in gcc debug output.
set complaints 20
92 changes: 92 additions & 0 deletions g++/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
Makefile
SYSCALLS.c.X
bc-arity.h
bc-opcode.h
bc-opname.h
bi-arity
bi-opcode
bi-opname
bi-parser.c
bi-parser.h
c++
c-parse.output
cc1
cc1chill
cc1obj
cc1plus
cccp
cexp.c
cexp.output
chill
chill.ignore
chill.info
chill.install
chill.log
chill.plog
chill.psum
chill.sum
collect2
config.status
cpp
dbg.log
deduced.h
fix-header
fixhdr.ready
fixinc.ready
fixproto.list
fixtmp.?
g++
g++-cross
g++.sum
gcc
gcc-cross
gcc.sum
gcov
gen-protos
genattr
genattrtab
gencodes
genconfig
genemit
genextract
genflags
genopinit
genoutput
genpeep
genrecog
genrtl
genrtl.h
genrtl.c
gfloat.h
insn-attr.h
insn-attrtab.c
insn-codes.h
insn-config.h
insn-emit.c
insn-extract.c
insn-flags.h
insn-opinit.c
insn-output.c
insn-peep.c
insn-recog.c
ld
libgcc2.ready
multilib.h
objc-headers
objc-parse.c
objc-parse.output
objc-parse.y
patch-header
protoize
protoize.1
scan-decls
site.exp
specs
stamp-*
stmp-*
unprotoize
unprotoize.1
xgcc
xlimits.h
xsys-protos.h
y.tab.c
Loading