Skip to content

Commit

Permalink
Avr (#409)
Browse files Browse the repository at this point in the history
* move ARM-specific peephole opts out

* move more ARM code out of assembler.ts

* make copy of backthumb.js to backavr.js to get started

* make it compile

* test hook in place

* basic tests working, labels working, more refactoring

* fix bugs from refactoring

* various fixes

* 32-bit support for AVR completed

* 32bit support completed

* getting ready for more testing of AVR

* Fix merge errors

* more work on AVR disassembler

* get printing to conform to our assembler

* more avr assembler testing

* assembler mods

* assembler fixes

generalize for longer instructions that include label and register

* fixes

* more bug fixes for 32-bit instructions

* bug fixes for 32bit inst

* fix relative branch computation

* first major test passing!

* minor changes

* fixed up bug with SP

* oops - forgot one

* a new bug - relative branch computation

* fixed bug in label encoder

* forgot one

* more mods

* more mods

* getting closer...

* first pass refactoring done

* move files around

* testing... bug fixes

* basic tests pass

* remove public

* fix up whitespace issues

* changes based on comments from michal

* remove new code

* Update .gitignore

* remove assembly file
  • Loading branch information
tballmsft authored Oct 4, 2016
1 parent 6def801 commit 7dbd6b7
Show file tree
Hide file tree
Showing 11 changed files with 2,272 additions and 1,371 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 18,4 @@ pxtwapp/pxtwapp/bld
*.suo
*.user
*.log
update-settings.sh
update-settings.sh
12 changes: 12 additions & 0 deletions cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2330,6 2330,17 @@ function simulatorCoverage(pkgCompileRes: pxtc.CompileResult, pkgOpts: pxtc.Comp
*/
}

function testAssemblers(): Promise<void> {
console.log("- testing Thumb")
pxtc.thumb.test();
console.log("- done testing Thumb");
console.log("- testing AVR")
pxtc.avr.testAVR();
console.log("- done testing AVR");
return Promise.resolve();
}


function testForBuildTargetAsync() {
let opts: pxtc.CompileOptions
return mainPkg.loadAsync()
Expand Down Expand Up @@ -3240,6 3251,7 @@ cmd("extract [FILENAME] - extract sources from .hex/.jsz file, stdin (
cmd("test - run tests on current package", testAsync, 1)
cmd("gendocs - build current package and its docs", gendocsAsync, 1)
cmd("format [-i] file.ts... - pretty-print TS files; -i = in-place", formatAsync, 1)
cmd("testassembler - test the assemblers", testAssemblers, 2)
cmd("decompile file.ts... - decompile ts files and produce similarly named .blocks files", decompileAsync, 1)
cmd("testdecompiler DIR - decompile files from DIR one-by-one and compare to baselines", testDecompilerAsync, 1)
cmd("testdecompilererrors DIR - decompile unsupported files from DIR one-by-one and check for errors", testDecompilerErrorsAsync, 1)
Expand Down
Loading

0 comments on commit 7dbd6b7

Please sign in to comment.