scripts: Use a string instead of magic numbers for register types.