Skip to content

Commit

Permalink
Add c++filt 5.3 (#56)
Browse files Browse the repository at this point in the history
* Add C++ 4.0 files

* minor makefile work

* Move C++ files to 5.3 folder

* add c++filt to makefile

* Fix ctype type and printf sp
  • Loading branch information
AngheloAlf authored Sep 10, 2023
1 parent 556f401 commit e1320ea
Show file tree
Hide file tree
Showing 18 changed files with 16 additions and 4 deletions.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ ifeq ($(VERSION),7.1)
IDO_LIBS :=
else ifeq ($(VERSION),5.3)
IDO_VERSION := IDO53
IDO_TC := cc strip acpp as0 as1 cfe copt ugen ujoin uld umerge uopt usplit ld upas
IDO_TC := cc strip acpp as0 as1 cfe copt ugen ujoin uld umerge uopt usplit ld upas c++filt
IDO_LIBS := crt1.o crtn.o libc.so libc.so.1 libexc.so libgen.so libm.so
else
$(error Unknown or unsupported IDO version - $(VERSION))
$(error Unknown or unsupported IDO version - $(VERSION))
endif


Expand Down Expand Up @@ -178,6 +178,14 @@ $(BUILD_DIR)/%.c: $(IRIX_USR_DIR)/lib/%
$(BUILD_DIR)/%.c: $(IRIX_USR_DIR)/bin/%
$(RECOMP_ELF) $(RECOMP_FLAGS) $< > $@ || ($(RM) -f $@ && false)

# IDO c++ files are in a different subfolder (`lib/DCC` and `lib/c++`)
$(BUILD_DIR)/%.c: $(IRIX_USR_DIR)/lib/DCC/%
$(RECOMP_ELF) $(RECOMP_FLAGS) $< > $@ || ($(RM) -f $@ && false)

# IDO c++ files are in a different subfolder (`lib/DCC` and `lib/c++`)
$(BUILD_DIR)/%.c: $(IRIX_USR_DIR)/lib/c++/%
$(RECOMP_ELF) $(RECOMP_FLAGS) $< > $@ || ($(RM) -f $@ && false)


$(BUILT_BIN)/%.cc: $(IRIX_USR_DIR)/lib/%.cc
cp $^ $@
Expand Down
Binary file added ido/5.3/usr/lib/CC
Binary file not shown.
Binary file added ido/5.3/usr/lib/DCC/delta_init.o
Binary file not shown.
Binary file added ido/5.3/usr/lib/DCC/edg_prelink
Binary file not shown.
Binary file added ido/5.3/usr/lib/DCC/edgcpfe
Binary file not shown.
Binary file added ido/5.3/usr/lib/c++/c++filt
Binary file not shown.
Binary file added ido/5.3/usr/lib/c++/c++patch
Binary file not shown.
Binary file added ido/5.3/usr/lib/c++/cfront
Binary file not shown.
Binary file added ido/5.3/usr/lib/c++/markc++
Binary file not shown.
Binary file added ido/5.3/usr/lib/c++/ptcomp
Binary file not shown.
Binary file added ido/5.3/usr/lib/c++/ptlink
Binary file not shown.
Binary file added ido/5.3/usr/lib/c++init.o
Binary file not shown.
Binary file added ido/5.3/usr/lib/libC.a
Binary file not shown.
Binary file added ido/5.3/usr/lib/libcomplex.a
Binary file not shown.
Binary file added ido/5.3/usr/lib/libdelta.a
Binary file not shown.
Binary file added ido/5.3/usr/lib/libmangle.a
Binary file not shown.
Binary file added ido/5.3/usr/lib/librqs.a
Binary file not shown.
8 changes: 6 additions & 2 deletions libc_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,6 @@ static uint32_t get_asterisk_args(uint8_t* mem, int count, int args[2], uint32_t
*/
int _mprintf(prout prout_func, uint8_t* mem, uint32_t* out, uint32_t format_addr, uint32_t sp) {
STRING(format)
sp += 8;

int ret = 0;
uint32_t sp_incr = 4;
Expand Down Expand Up @@ -920,14 +919,19 @@ int _mprintf(prout prout_func, uint8_t* mem, uint32_t* out, uint32_t format_addr
}

int wrapper_fprintf(uint8_t* mem, uint32_t fp_addr, uint32_t format_addr, uint32_t sp) {
sp += 8;
return _mprintf(prout_file, mem, &fp_addr, format_addr, sp);
}

int wrapper_printf(uint8_t* mem, uint32_t format_addr, uint32_t sp) {
return wrapper_fprintf(mem, STDOUT_ADDR, format_addr, sp);
uint32_t fp_addr = STDOUT_ADDR;

sp += 4;
return _mprintf(prout_file, mem, &fp_addr, format_addr, sp);
}

int wrapper_sprintf(uint8_t* mem, uint32_t str_addr, uint32_t format_addr, uint32_t sp) {
sp += 8;
return _mprintf(prout_mem, mem, &str_addr, format_addr, sp);
}

Expand Down

0 comments on commit e1320ea

Please sign in to comment.