avr: add interrupt support

Interrupts are supported using a special //go:interrupt pragma.
For example:

//go:interrupt INT0_vect
func handleINT0() {
    // do something here
}
This commit is contained in:
Ayke van Laethem
2018-09-23 23:31:28 +02:00
parent dc88948f55
commit 13cb7d6503
3 changed files with 27 additions and 3 deletions
+1 -1
View File
@@ -266,7 +266,7 @@ func (p *Program) SimpleDCE() {
p.GetFunction(main).flag = true
worklist := []*ssa.Function{main}
for _, f := range p.Functions {
if f.Synthetic == "package initializer" || f.Pkg == runtimePkg {
if f.exported || f.Synthetic == "package initializer" || f.Pkg == runtimePkg {
if f.flag || isCGoInternal(f.Name()) {
continue
}