I can't recall exactly but someone told me, may have been Graham Waterworth.
As said above, simply G48S1000 or whatever S***** you want to limit the spindle to.
This is only whilst if CSS mode though so won't work in G94 or G95 as rpm in these modes are called by the S Word. In CSS the S Word is surface speed and rpm will depend on diameter, hence the need to limit the rpm on some parts as you probably don't want a 400mm dia part spinning at 5000rpm

Hood