Skip to content

Commit

Permalink
Renamed opcode -> instruction where appropriate. Might fix GitHub issue
Browse files Browse the repository at this point in the history
  • Loading branch information
vhelin committed Jun 10, 2022
1 parent f1305d4 commit 10bfbab
Show file tree
Hide file tree
Showing 161 changed files with 2,940 additions and 1,983 deletions.
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,24 +144,24 @@ foreach(ARCH IN LISTS ARCHS)
list(GET ARCH 0 WLA_NAME)
list(GET ARCH 1 COMPILE_DEF)

# Generate opcode table
# Generate instructions table
if((NOT CMAKE_CROSSCOMPILING) OR CMAKE_CROSSCOMPILING_EMULATOR)
add_executable(gen-${WLA_NAME}
"opcode_table_generator/main.c"
"opcodes_${WLA_NAME}.c"
"instruction_table_generator/main.c"
"instructions_${WLA_NAME}.c"
)
set_property(TARGET gen-${WLA_NAME} APPEND
PROPERTY COMPILE_DEFINITIONS
"${COMPILE_DEF}"
)
set_property(TARGET gen-${WLA_NAME} PROPERTY
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/op_tbl_gen/")
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/ins_tbl_gen/")
list(APPEND GENERATOR_TARGETS gen-${WLA_NAME})
add_dependencies(generators gen-${WLA_NAME})
endif()
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/op_tbl_gen/")
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/ins_tbl_gen/")
set(TABLE_GEN_OUTPUT
"${CMAKE_CURRENT_BINARY_DIR}/op_tbl_gen/opcodes_${WLA_NAME}_tables.c")
"${CMAKE_CURRENT_BINARY_DIR}/ins_tbl_gen/instructions_${WLA_NAME}_tables.c")
add_custom_command(
OUTPUT "${TABLE_GEN_OUTPUT}"
COMMAND ${GEN_PREFIX}gen-${WLA_NAME}
Expand All @@ -171,7 +171,7 @@ foreach(ARCH IN LISTS ARCHS)
# Generate actual wla binary
add_executable(wla-${WLA_NAME}
${WLA_SRCS} "${TABLE_GEN_OUTPUT}"
"opcodes_${WLA_NAME}.c"
"instructions_${WLA_NAME}.c"
)
set_property(TARGET wla-${WLA_NAME} APPEND PROPERTY
COMPILE_DEFINITIONS "${COMPILE_DEF}")
Expand Down
258 changes: 244 additions & 14 deletions byte_tester/makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,253 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.20

CC=gcc
LD=gcc
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target

CFLAGS= -c -ansi -O0 -g -pedantic -Wall
LDFLAGS =
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:

CFILES = main.c
OFILES = main.o
#=============================================================================
# Special targets provided by cmake.

all: $(OFILES) makefile
$(LD) $(LDFLAGS) $(OFILES) -o byte_tester
# Disable implicit rules so canonical targets will work.
.SUFFIXES:

main.o: main.c makefile
$(CC) $(CFLAGS) main.c
# Disable VCS-based implicit rules.
% : %,v

$(OFILES): $(HFILES) $(CFILES)
# Disable VCS-based implicit rules.
% : RCS/%

# Disable VCS-based implicit rules.
% : RCS/%,v

# Disable VCS-based implicit rules.
% : SCCS/s.%

# Disable VCS-based implicit rules.
% : s.%

.SUFFIXES: .hpux_make_needs_suffix_list

# Command-line flag to silence nested $(MAKE).
$(VERBOSE)MAKESILENT = -s

#Suppress display of executed commands.
$(VERBOSE).SILENT:

# A target that is always out of date.
cmake_force:
.PHONY : cmake_force

#=============================================================================
# Set environment variables for the build.

# The shell in which to execute make rules.
SHELL = /bin/sh

# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake.exe

# The command to remove a file.
RM = /usr/bin/cmake.exe -E rm -f

# Escaping for special characters.
EQUALS = =

# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /cygdrive/v/wla-dx-master-4

# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /cygdrive/v/wla-dx-master-4

#=============================================================================
# Targets provided globally by CMake.

# Special rule for the target install/strip
install/strip: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
/usr/bin/cmake.exe -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
.PHONY : install/strip

# Special rule for the target install/strip
install/strip/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
/usr/bin/cmake.exe -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
.PHONY : install/strip/fast

# Special rule for the target install/local
install/local: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
/usr/bin/cmake.exe -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
.PHONY : install/local

# Special rule for the target install/local
install/local/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
/usr/bin/cmake.exe -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
.PHONY : install/local/fast

# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
/usr/bin/ccmake.exe -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : edit_cache

# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast

# Special rule for the target package_source
package_source:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..."
cd /cygdrive/v/wla-dx-master-4 && /usr/bin/cpack.exe --config ./CPackSourceConfig.cmake /cygdrive/v/wla-dx-master-4/CPackSourceConfig.cmake
.PHONY : package_source

# Special rule for the target package_source
package_source/fast: package_source
.PHONY : package_source/fast

# Special rule for the target install
install: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
/usr/bin/cmake.exe -P cmake_install.cmake
.PHONY : install

# Special rule for the target install
install/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
/usr/bin/cmake.exe -P cmake_install.cmake
.PHONY : install/fast

# Special rule for the target list_install_components
list_install_components:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
.PHONY : list_install_components

# Special rule for the target list_install_components
list_install_components/fast: list_install_components
.PHONY : list_install_components/fast

# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake.exe --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache

# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast

# Special rule for the target package
package: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..."
cd /cygdrive/v/wla-dx-master-4 && /usr/bin/cpack.exe --config ./CPackConfig.cmake
.PHONY : package

# Special rule for the target package
package/fast: package
.PHONY : package/fast

# The main all target
all: cmake_check_build_system
cd /cygdrive/v/wla-dx-master-4 && $(CMAKE_COMMAND) -E cmake_progress_start /cygdrive/v/wla-dx-master-4/CMakeFiles /cygdrive/v/wla-dx-master-4/byte_tester//CMakeFiles/progress.marks
cd /cygdrive/v/wla-dx-master-4 && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 byte_tester/all
$(CMAKE_COMMAND) -E cmake_progress_start /cygdrive/v/wla-dx-master-4/CMakeFiles 0
.PHONY : all

# The main clean target
clean:
rm $(OFILES) byte_tester *~
cd /cygdrive/v/wla-dx-master-4 && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 byte_tester/clean
.PHONY : clean

# The main clean target
clean/fast: clean
.PHONY : clean/fast

# Prepare targets for installation.
preinstall: all
cd /cygdrive/v/wla-dx-master-4 && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 byte_tester/preinstall
.PHONY : preinstall

# Prepare targets for installation.
preinstall/fast:
cd /cygdrive/v/wla-dx-master-4 && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 byte_tester/preinstall
.PHONY : preinstall/fast

# clear depends
depend:
cd /cygdrive/v/wla-dx-master-4 && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend

# Convenience name for target.
byte_tester/CMakeFiles/byte_tester.dir/rule:
cd /cygdrive/v/wla-dx-master-4 && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 byte_tester/CMakeFiles/byte_tester.dir/rule
.PHONY : byte_tester/CMakeFiles/byte_tester.dir/rule

# Convenience name for target.
byte_tester: byte_tester/CMakeFiles/byte_tester.dir/rule
.PHONY : byte_tester

# fast build rule for target.
byte_tester/fast:
cd /cygdrive/v/wla-dx-master-4 && $(MAKE) $(MAKESILENT) -f byte_tester/CMakeFiles/byte_tester.dir/build.make byte_tester/CMakeFiles/byte_tester.dir/build
.PHONY : byte_tester/fast

main.o: main.c.o
.PHONY : main.o

# target to build an object file
main.c.o:
cd /cygdrive/v/wla-dx-master-4 && $(MAKE) $(MAKESILENT) -f byte_tester/CMakeFiles/byte_tester.dir/build.make byte_tester/CMakeFiles/byte_tester.dir/main.c.o
.PHONY : main.c.o

main.i: main.c.i
.PHONY : main.i

# target to preprocess a source file
main.c.i:
cd /cygdrive/v/wla-dx-master-4 && $(MAKE) $(MAKESILENT) -f byte_tester/CMakeFiles/byte_tester.dir/build.make byte_tester/CMakeFiles/byte_tester.dir/main.c.i
.PHONY : main.c.i

main.s: main.c.s
.PHONY : main.s

# target to generate assembly for a file
main.c.s:
cd /cygdrive/v/wla-dx-master-4 && $(MAKE) $(MAKESILENT) -f byte_tester/CMakeFiles/byte_tester.dir/build.make byte_tester/CMakeFiles/byte_tester.dir/main.c.s
.PHONY : main.c.s

# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... edit_cache"
@echo "... install"
@echo "... install/local"
@echo "... install/strip"
@echo "... list_install_components"
@echo "... package"
@echo "... package_source"
@echo "... rebuild_cache"
@echo "... byte_tester"
@echo "... main.o"
@echo "... main.i"
@echo "... main.s"
.PHONY : help



#=============================================================================
# Special targets to cleanup operation of make.

# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
cd /cygdrive/v/wla-dx-master-4 && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system

install:
make ; cp byte_tester ../binaries

0 comments on commit 10bfbab

Please sign in to comment.