more fixes for --cpu:avr [backport] (#12748)

This commit is contained in:
Andreas Rumpf 2019-11-27 16:24:21 +01:00 • committed by GitHub
commit fd85a5ae05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 5 deletions

View file

@ -7,10 +7,13 @@
# distribution, for details about the copyright.
#
const
TableSize = when sizeof(int) <= 2: 0xff else: 0xff_ffff
type
PtrTable = ptr object
counter, max: int
data: array[0xff_ffff, (pointer, pointer)]
data: array[TableSize, (pointer, pointer)]
template hashPtr(key: pointer): int = cast[int](key) shr 8
template allocPtrTable: untyped =